News for hackers. Stuff that matters.
Re:What's New in Ruby 2.1 [pdf] by bct on Wednesday November 27, 2013 @02:42PM (#6810573)
It's not sending a message - that would defeat the purpose. It's constructing a frozen string, reusing an existing one when possible.

Prior to 2.1:

    def foo
      "bar".freeze
    end
does these things every time `foo` is called:

1. copies the characters 'b', 'a', and 'r' into a mutable string

2. sends the message `freeze` to the new string, which...

3. marks the string as frozen.

In 2.1 `"bar".freeze` is equivalent to `"bar"f`, which will not make a copy every time `foo` is called. See https://bugs.ruby-lang.org/issues/8579 for more discussion.

Re:What's New in Ruby 2.1 [pdf] by jamesbritt on Wednesday November 27, 2013 @07:32PM (#6812290)
I see. Thank you.