immutable-struct icon indicating copy to clipboard operation
immutable-struct copied to clipboard

merge() method is broken?

Open key88sf opened this issue 2 years ago • 0 comments

Ruby 3.04:

3.0.4 :001 > RRR = ImmutableStruct.new(:source_type, :text, :score, :data, :error_message)
 => RRR 
3.0.4 :002 > x1 = RRR.new(text: "Hello")
 => #<struct RRR source_type=nil, text="Hello", score=nil, data=nil, error_message=nil> 
3.0.4 :003 > x2 = x1.merge(score: 99)
(irb):3:in `<main>': undefined method `merge' for #<struct RRR source_type=nil, text="Hello", score=nil, data=nil, error_message=nil> (NoMethodError)

key88sf avatar Feb 09 '23 19:02 key88sf