Whitespace in irb
...Makes a difference.
irb(main):017:0> class Greeter
irb(main):018:1> attr_accessor :name
irb(main):019:1> end
irb(main):022:0> m.respond_to?('name =')
=> false
irb(main):023:0> m.respond_to?('name=')
=> true
Written by Melanie Archer
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#