ruby-changes:56204
From: Nobuyoshi <ko1@a...>
Date: Sun, 23 Jun 2019 08:01:25 +0900 (JST)
Subject: [ruby-changes:56204] Nobuyoshi Nakada: 3840791b7e (trunk): Get rid of error with frozen string literal
https://git.ruby-lang.org/ruby.git/commit/?id=3840791b7e From 3840791b7ebb2442724d96c69a791d0e678fbc6c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 23 Jun 2019 07:56:43 +0900 Subject: Get rid of error with frozen string literal [Bug #14194] diff --git a/test/-ext-/string/test_fstring.rb b/test/-ext-/string/test_fstring.rb index 1b3b15c..8612b5d 100644 --- a/test/-ext-/string/test_fstring.rb +++ b/test/-ext-/string/test_fstring.rb @@ -58,7 +58,7 @@ class Test_String_Fstring < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/-ext-/string/test_fstring.rb#L58 end def test_singleton_class - str = noninterned_name.force_encoding("us-ascii") + str = noninterned_name fstr = Bug::String.fstring(str) assert_raise(TypeError) {fstr.singleton_class} end diff --git a/test/-ext-/symbol/noninterned_name.rb b/test/-ext-/symbol/noninterned_name.rb index 7c9097a..d8b8fb0 100644 --- a/test/-ext-/symbol/noninterned_name.rb +++ b/test/-ext-/symbol/noninterned_name.rb @@ -1,3 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/-ext-/symbol/noninterned_name.rb#L1 +# frozen-string-literal: true + require "-test-/symbol" module Test_Symbol -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/