Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Class
- class Foo
- attr_accessor :bar
- end
- a = Foo.new
- b = a
- a.bar = "hello"
- b.bar = "bye"
- puts "a == b #{a == b}"
- puts "a === b #{a === b}"
- puts "a.equal?(b) #{a.equal?(b)}"
- ## Output
- a == b true
- a === b true
- a.equal?(b) true
Add Comment
Please, Sign In to add comment