23 Feb '14, 11pm

#deep_clone and #deep_dup for Objects - Ruby Forum:

Issue #4514 has been updated by Kurt Stephens. Marc-Andre Lafortune wrote: > Shyouhei Urabe wrote: > > * It is not always obvious what a "deep" copy is. For instance it is very hard to define one for a Proc instance. > > * Recursive duplication may not be that simple to implement than you imagine. For instance an Array can contain itself: > > r = [].tap {|r| r << r } > > How do you copy it deeply? > > That shouldn't be too hard, we simply maintain a hash with the ids of objects being cloned as keys and with the corresponding new copies as values. I would have fun implementing it. Note that `Marshal::load(Marshal::dump(r))` works for recursive arrays and so does YAML serialization. > See https://github.com/kstephens/red_steak/blob/master/lib/red_steak/copier.rb The problem is how to control how "deep" a copier should go, which objects need to have identity maintained and wh...

Full article: https://www.ruby-forum.com/topic/3818594

Tweets

"Ruby 1.9.3-p545 is released" #ruby

ruby-lang.org 24 Feb '14, 6am

This is the last ordinal release of Ruby 1.9.3. It means that Ruby 1.9.3 goes into the state of the security maintenance p...

Ruby 1.9.3-p545 is released

ruby-lang.org 24 Feb '14, 6am

This is the last ordinal release of Ruby 1.9.3. It means that Ruby 1.9.3 goes into the state of the security maintenance p...

“Ruby 2.0.0-p451 リリース”

ruby-lang.org 24 Feb '14, 1pm

今日は Ruby の 21 回目の誕生日です。 これを記念して、Ruby 2.0.0-p451 がリリースされました。 今回のリリースには、多数のバグ修正が含まれています。 詳しくは、対応するチケット および ChangeLog を確認して下さ...

Ruby 2.0.0-p451 is released

ruby-lang.org 24 Feb '14, 1pm

Today, Feb. 24th is the 21th anniversary of Ruby, so we happily announce a new patch release Ruby 2.0.0-p451. This release...

Ruby 1.9.3-p545 リリース

ruby-lang.org 24 Feb '14, 6am

今日は Ruby の 21 回目の誕生日です。 これを記念して、Ruby 1.9.3-p545 がリリースされました。 今回のリリースが、Ruby 1.9.3 の最後の通常リリースとなります。 致命的なリグレッションが発見されない限り、Ruby...

microformats2 (2.0.0): parses HTML for microfor...

rubygems.org 25 Feb '14, 11pm

parses HTML for microformats and return a collection of dynamically defined Ruby objects

activeform-rails (0.0.1): Enable to use the con...

rubygems.org 22 Feb '14, 8pm

Enable to use the concept of form objects with ActiveModel

seed_file (0.1.1): Create ActiveRecord objects ...

rubygems.org 24 Feb '14, 1am

seed_file 0.1.1 Create ActiveRecord objects using a CSV file install gem install seed_file Download Documentation Badge Su...

“[Ruby 1.9 - Feature #4592][Open] Tempfileを直接保存...

ruby-forum.com 08 Mar '14, 1am

Issue #4592 has been updated by mame (Yusuke Endoh). Description updated Status changed from Open to Assigned Assignee set...

“Ruby 2.1.1 リリース”

ruby-lang.org 24 Feb '14, 1pm

今日は Ruby の 21 回目の誕生日ですので、Ruby 2.1 の新しいパッチリリース、Ruby 2.1.1 をリリースします。 Ruby 2.1 は Ruby 1.9 から始まる Ruby 2 系の最新の安定版です。Ruby 2.1 は以...

Ruby 2.1.1 is released

ruby-lang.org 24 Feb '14, 1pm

Today, Feb. 24th, is the 21st anniversary of Ruby, so we happily announce a new patch release of Ruby 2.1, Ruby 2.1.1. Rub...