diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-05-27 17:52:35 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-06-04 19:25:03 -0700 |
commit | f1f04caf60e4fc9dc3b12109e0be831f2d692810 (patch) | |
tree | 0e6eba1746bc641b74db760133c794f7b466a4f1 /eval.c | |
parent | 96d65274246a4be88581693f452e6b3bae9fdc5c (diff) | |
download | ruby-f1f04caf60e4fc9dc3b12109e0be831f2d692810.tar.gz |
Include inspect value of object in FrozenError messages
FrozenError#receiver was added recently for getting the related
object programmatically. However, there are cases where FrozenError
is raised and not handled, and in those cases the resulting error
messages lack detail, which makes debugging the error more difficult,
especially in cases where the error is not easily reproducible.
This includes the inspect value of the frozen object in FrozenError
messages, which should make debugging simpler.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -454,7 +454,7 @@ rb_class_modify_check(VALUE klass) goto noclass; } } - rb_frozen_error_raise(klass, "can't modify frozen %s", desc); + rb_frozen_error_raise(klass, "can't modify frozen %s: %"PRIsVALUE, desc, klass); } } |