Which version of Ruby did the clone method begin to work on TrueClass, Fixnum and Symbol and others?


(Ed Howland) #1

Hi All,
In version 2.2, when I do something like true.clone, I get a runtime/type
error. In 2.4 and later this works.
Does anyone know when this occurred. I would like it for my install docs.

Thanks in advance.
Cheers,
Ed

Ed Howland


http://twitter.com/ed_howland


(Jakub Pavlik jn.) #2

Hi Ed,

the change occurred in 2.4.0

as demonstrated by this Travis test matrix: https://travis-ci.org/igneus/
ruby-clone-test

the code run there: https://github.com/igneus/ruby-clone-test

I wasn't able to identify a respective changelog entry in https://github.
com/ruby/ruby/blob/v2_4_0/NEWS , though. (I didn't attempt to traverse git
history.)

Regards,

Jakub

---------- Původní e-mail ----------
Od: Ed Howland <ed.howland@gmail.com>
Komu: Ruby users <ruby-talk@ruby-lang.org>
Předmět: Which version of Ruby did the clone method begin to work on
TrueClass, Fixnum and Symbol and others?
"
Hi All,
In version 2.2, when I do something like true.clone, I get a runtime/type
error. In 2.4 and later this works.

Does anyone know when this occurred. I would like it for my install docs.

Thanks in advance.

Cheers,
Ed

Ed Howland
http://greenprogrammer.wordpress.com(http://greenprogrammer.wordpress.com)
http://twitter.com/ed_howland(http://twitter.com/ed_howland)

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
"

···

Datum: 30. 7. 2018 22:55:28


(Ed Howland) #3

Hi.
Thanks for the info. Never occurred to me to check the Travis CI stuff.
Mostly my code works back to 2.2.x and I was doing s a specific kind of
deep clone. So I had to writ some ugly guard cases around these immutable
types.

Thanks again.

Regards, Ed

Cheers,
Ed

Ed Howland


http://twitter.com/ed_howland

···

On Mon, Jul 30, 2018 at 5:43 PM, Jakub Pavlík <severus@post.cz> wrote:

Hi Ed,

the change occurred in 2.4.0

as demonstrated by this Travis test matrix: https://travis-ci.org/igneus/
ruby-clone-test
the code run there: https://github.com/igneus/ruby-clone-test

I wasn't able to identify a respective changelog entry in
https://github.com/ruby/ruby/blob/v2_4_0/NEWS , though. (I didn't attempt
to traverse git history.)

Regards,
Jakub

---------- Původní e-mail ----------
Od: Ed Howland <ed.howland@gmail.com>
Komu: Ruby users <ruby-talk@ruby-lang.org>
Datum: 30. 7. 2018 22:55:28
Předmět: Which version of Ruby did the clone method begin to work on
TrueClass, Fixnum and Symbol and others?

Hi All,
In version 2.2, when I do something like true.clone, I get a runtime/type
error. In 2.4 and later this works.
Does anyone know when this occurred. I would like it for my install docs.

Thanks in advance.
Cheers,
Ed

Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>