-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Hi Team,
There seems to be a bit of inconsistency with the error messages when we try to modify frozen object.
In Ruby MRI:
s = String.new.freeze
s.upcase!
RuntimeError: can't modify frozen StringIn JRuby:
s = String.new.freeze
s.upcase!
RuntimeError: can't modify frozen stringThe difference here is the casing.
If we have a custom class
class Test
attr_accessor :name
endIn Ruby MRI:
t = Test.new.freeze
t.name = 'Test'
RuntimeError: can't modify frozen TestIn JRuby:
t = Test.new.freeze
t.name = 'Test'
RuntimeError: can't modify frozenIn this example we are missing the name of the class.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels