1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/ostruct.rb: Added OpenStruct#==.

* test/ostruct/test_ostruct.rb: Added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ntalbott 2003-09-25 00:03:11 +00:00
parent 94bfebb3fa
commit fb1f07049f
3 changed files with 37 additions and 0 deletions

View file

@ -48,4 +48,12 @@ class OpenStruct
end
str << ">"
end
attr_reader :table
protected :table
def ==(other)
return false unless(other.kind_of?(OpenStruct))
return @table == other.table
end
end