From ec2e04c90d96541502c9b96e66900b4bb01676bb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 29 Oct 2021 17:34:09 +0900 Subject: Preserve the encoding of message from outer local variables --- test/ruby/test_proc.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby/test_proc.rb') diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 1f87085f9f..51872e49be 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -1611,6 +1611,12 @@ class TestProc < Test::Unit::TestCase Proc.new{yield}.isolate end + + name = "\u{2603 26a1}" + assert_raise_with_message(ArgumentError, /\(#{name}\)/) do + eval("#{name} = :#{name}; Proc.new {p #{name}}").isolate + end + # binding :a.tap{|a| -- cgit v1.2.3