Feature #7007

Make OpenStruct#new accept OpenStruct object

Added by Ilya Vorontsov almost 3 years ago. Updated over 2 years ago.

[ruby-core:47476]
Status:Closed
Priority:Normal
Assignee:Marc-Andre Lafortune

Description

Now we have OpenStruct.new(hash) method. But it can be more consistent if one can use it also in form OpenStruct.new(open_struct) which will create a new instance which is a copy of an argument.

Associated revisions

Revision 37375
Added by Marc-Andre Lafortune over 2 years ago

  • lib/ostruct.rb: Also accept {Open}Struct as argument to new [Feature #7007]

Revision 37375
Added by Marc-Andre Lafortune over 2 years ago

  • lib/ostruct.rb: Also accept {Open}Struct as argument to new [Feature #7007]

History

#1 Updated by Marc-Andre Lafortune almost 3 years ago

  • Category set to lib
  • Assignee set to Marc-Andre Lafortune
  • Target version set to 2.0.0

#2 Updated by Koichi Sasada almost 3 years ago

ping? status?

#3 Updated by Marc-Andre Lafortune over 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r37375.
Ilya, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/ostruct.rb: Also accept {Open}Struct as argument to new [Feature #7007]

Also available in: Atom PDF