mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
B #5419: Protected info_all method does respond_to? in Ruby 1.9
(cherry picked from commit 861b292f16)
This commit is contained in:
1 parent
1166485a7f
commit
b502c32a64
1 file changed
+4
-2
@@ -34,9 +34,11 @@ class VIHelper
|
||||
|
||||
def self.one_pool(the_class, exit_if_fail = true)
|
||||
item = the_class.new(client)
|
||||
if item.respond_to?(:info_all)
|
||||
|
||||
rc = nil
|
||||
begin
|
||||
rc = item.info_all
|
||||
else
|
||||
rescue
|
||||
rc = item.info
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user