Merge branch 'fix/master/getparam_failure'
* fix/master/getparam_failure: (maint) Fix getparam() spec failure on MRI 1.8
This commit is contained in:
commit
2559be9258
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,8 @@ ENDOFDOC
|
|||
raise(ArgumentError, 'Must specify a reference') unless reference
|
||||
raise(ArgumentError, 'Must specify name of a parameter') unless param and param.instance_of? String
|
||||
|
||||
return '' if param.empty?
|
||||
|
||||
if resource = findresource(reference.to_s)
|
||||
return resource[param] if resource[param]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue