Discussion:
Which version of Ruby did the clone method begin to work on TrueClass, Fixnum and Symbol and others?
Ed Howland
2018-07-30 20:53:21 UTC
Permalink
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
Jakub Pavlík
2018-07-30 21:43:59 UTC
Permalink
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 <***@gmail.com>
Komu: Ruby users <ruby-***@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://greenprogrammer.wordpress.com)
http://twitter.com/ed_howland(http://twitter.com/ed_howland)




Unsubscribe: <mailto:ruby-talk-***@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
"
Ed Howland
2018-08-02 16:35:55 UTC
Permalink
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://greenprogrammer.wordpress.com
http://twitter.com/ed_howland
Post by Jakub Pavlík
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 ----------
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
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
Loading...