1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

convert method symbols to strings for 1.9 compatibility.

This commit is contained in:
Charles Lowell 2010-06-29 07:47:08 +03:00
parent 626b36cf5c
commit 4e83c7b889

View file

@ -181,11 +181,11 @@ module V8
private
# evil - but access will be plugggable
def accessible_methods(obj)
obj.public_methods(false).to_set.tap do |methods|
obj.public_methods(false).map {|m| m.to_s}.to_set.tap do |methods|
ancestors = obj.class.ancestors.dup
while ancestor = ancestors.shift
break if ancestor == ::Object
methods.merge(ancestor.public_instance_methods(false))
methods.merge(ancestor.public_instance_methods(false).map {|m| m.to_s})
end
end
end