This works
irb(main):001:0> name = "Rohit " "Sharma"
=> "Rohit Sharma"
But this doesn't
irb(main):001:0> fname = "Rohit "
=> "Rohit "
irb(main):002:0> lname = "Sharma"
=> "Sharma"
irb(main):003:0> name = fname lname
It gives this error
NoMethodError: undefined method `fname' for main:Object
from (irb):3
Please provide some suggestions. Thanks in advance.
UPDATE
After getting the answers I have written a blog post. Please check it out.