diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-01 09:51:48 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-01 09:51:48 +0000 |
commit | d4fe9e004adbd6dc0ffbf2ff8626601da3a8fed4 (patch) | |
tree | b6a9d6c280ed3d368674387ac2e2230a199785e6 /lib | |
parent | 1f65a21b6fe389e5183b068e01d2ef5e18f89483 (diff) | |
download | ruby-d4fe9e004adbd6dc0ffbf2ff8626601da3a8fed4.tar.gz |
* lib/set.rb (#initialize_copy, #eql): Use instance_variable_get
instead of instance_eval.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/set.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/set.rb b/lib/set.rb index 19bb892feb..87a941e565 100755 --- a/lib/set.rb +++ b/lib/set.rb @@ -96,7 +96,7 @@ class Set # Copy internal hash. def initialize_copy(orig) - @hash = orig.instance_eval{@hash}.dup + @hash = orig.instance_variable_get(:@hash).dup end def freeze # :nodoc: @@ -384,7 +384,7 @@ class Set def eql?(o) # :nodoc: return false unless o.is_a?(Set) - @hash.eql?(o.instance_eval{@hash}) + @hash.eql?(o.instance_variable_get(:@hash)) end # Classifies the set by the return value of the given block and |