(PDOC-27) Make fix compatible with Ruby 2x
Prior to this commit, the fix for the 3x function issue was trying to create an empty hash by calling Hash[ [[]] ] which in Ruby 1.9.3 produced and empty hash. However this is not the case in Ruby 2.0 and up. Therefor, fix up the code so that it does not rely on Hash[ [[]] ] creating and empty hash.
This commit is contained in:
parent
0a3c37373c
commit
849c731511
|
@ -73,11 +73,13 @@ class PuppetX::PuppetLabs::Strings::YARD::Handlers::Puppet3xFunctionHandler < YA
|
|||
# and the values on either side of it.
|
||||
tuple.jump(:assoc).map{|e| process_element(e)}
|
||||
end
|
||||
|
||||
options = Hash[opts]
|
||||
else
|
||||
opts = [[]]
|
||||
options = {}
|
||||
end
|
||||
|
||||
[name, Hash[opts]]
|
||||
[name, options]
|
||||
end
|
||||
|
||||
# Sometimes the YARD parser returns Heredoc strings that start with `<-`
|
||||
|
|
Loading…
Reference in New Issue