diff options
Diffstat (limited to 'spec/ruby/optional/capi/encoding_spec.rb')
| -rw-r--r-- | spec/ruby/optional/capi/encoding_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/optional/capi/encoding_spec.rb b/spec/ruby/optional/capi/encoding_spec.rb index 857e421ddb..b74a360760 100644 --- a/spec/ruby/optional/capi/encoding_spec.rb +++ b/spec/ruby/optional/capi/encoding_spec.rb @@ -312,7 +312,7 @@ describe "C-API Encoding function" do end it "sets the encoding of a Regexp to that of the second argument" do - @s.rb_enc_copy(/regexp/, @obj).encoding.should == Encoding::US_ASCII + @s.rb_enc_copy(/regexp/.dup, @obj).encoding.should == Encoding::US_ASCII end end @@ -363,7 +363,7 @@ describe "C-API Encoding function" do end it "sets the encoding of a Regexp to the encoding" do - @s.rb_enc_associate(/regexp/, "BINARY").encoding.should == Encoding::BINARY + @s.rb_enc_associate(/regexp/.dup, "BINARY").encoding.should == Encoding::BINARY end it "sets the encoding of a String to a default when the encoding is NULL" do @@ -380,7 +380,7 @@ describe "C-API Encoding function" do it "sets the encoding of a Regexp to the encoding" do index = @s.rb_enc_find_index("UTF-8") - enc = @s.rb_enc_associate_index(/regexp/, index).encoding + enc = @s.rb_enc_associate_index(/regexp/.dup, index).encoding enc.should == Encoding::UTF_8 end |
