summaryrefslogtreecommitdiff
path: root/spec/ruby/core/encoding/converter/new_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
committerBenoit Daloze <eregontp@gmail.com>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/encoding/converter/new_spec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/encoding/converter/new_spec.rb')
-rw-r--r--spec/ruby/core/encoding/converter/new_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/core/encoding/converter/new_spec.rb b/spec/ruby/core/encoding/converter/new_spec.rb
index 6b9c76a093..6a6343012c 100644
--- a/spec/ruby/core/encoding/converter/new_spec.rb
+++ b/spec/ruby/core/encoding/converter/new_spec.rb
@@ -23,7 +23,7 @@ describe "Encoding::Converter.new" do
end
it "raises an Encoding::ConverterNotFoundError if both encodings are the same" do
- lambda do
+ -> do
Encoding::Converter.new "utf-8", "utf-8"
end.should raise_error(Encoding::ConverterNotFoundError)
end
@@ -65,25 +65,25 @@ describe "Encoding::Converter.new" do
obj = mock("encoding converter replacement")
obj.should_receive(:to_str).and_return(1)
- lambda do
+ -> do
Encoding::Converter.new("us-ascii", "utf-8", replace: obj)
end.should raise_error(TypeError)
end
it "raises a TypeError if passed true for the replacement object" do
- lambda do
+ -> do
Encoding::Converter.new("us-ascii", "utf-8", replace: true)
end.should raise_error(TypeError)
end
it "raises a TypeError if passed false for the replacement object" do
- lambda do
+ -> do
Encoding::Converter.new("us-ascii", "utf-8", replace: false)
end.should raise_error(TypeError)
end
it "raises a TypeError if passed a Fixnum for the replacement object" do
- lambda do
+ -> do
Encoding::Converter.new("us-ascii", "utf-8", replace: 1)
end.should raise_error(TypeError)
end