Derek Lin wrote in post #1075271: > Do you mean "#{base_title} | Home" is more efficient because it doesn't > create a new String object? >
It certainly does create a new String object--that's what the quotes do; they tell Ruby, "Please create a new String object for me. The difference is that the following: base_title + "| Home" ...creates two more String objects: "| Home" and another created by +. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.