ruby-changes:56017
From: Nobuyoshi <ko1@a...>
Date: Wed, 5 Jun 2019 13:05:49 +0900 (JST)
Subject: [ruby-changes:56017] Nobuyoshi Nakada: b2fe7484e7 (trunk): Test for f1f04caf60e4fc9dc3b12109e0be831f2d692810
https://git.ruby-lang.org/ruby.git/commit/?id=b2fe7484e7 From b2fe7484e7e7c7741f33bfb02c2fc91f03763ab4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 5 Jun 2019 12:57:14 +0900 Subject: Test for f1f04caf60e4fc9dc3b12109e0be831f2d692810 diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 9a0de5c..54e39a0 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -880,6 +880,14 @@ end.join https://github.com/ruby/ruby/blob/trunk/test/ruby/test_exception.rb#L880 } end + def test_frozen_error_message + obj = Object.new.freeze + e = assert_raise_with_message(FrozenError, /can't modify frozen #{obj.class}/) { + obj.instance_variable_set(:@test, true) + } + assert_include(e.message, obj.inspect) + end + def test_name_error_new_default error = NameError.new assert_equal("NameError", error.message) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/