summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/setbyte_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/string/setbyte_spec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/string/setbyte_spec.rb')
-rw-r--r--spec/ruby/core/string/setbyte_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/string/setbyte_spec.rb b/spec/ruby/core/string/setbyte_spec.rb
index 3f2e03f8a8..6912b1b66f 100644
--- a/spec/ruby/core/string/setbyte_spec.rb
+++ b/spec/ruby/core/string/setbyte_spec.rb
@@ -51,11 +51,11 @@ describe "String#setbyte" do
end
it "raises an IndexError if the index is greater than the String bytesize" do
- lambda { "?".setbyte(1, 97) }.should raise_error(IndexError)
+ -> { "?".setbyte(1, 97) }.should raise_error(IndexError)
end
it "raises an IndexError if the negative index is greater magnitude than the String bytesize" do
- lambda { "???".setbyte(-5, 97) }.should raise_error(IndexError)
+ -> { "???".setbyte(-5, 97) }.should raise_error(IndexError)
end
it "sets a byte at an index greater than String size" do
@@ -78,11 +78,11 @@ describe "String#setbyte" do
it "raises a #{frozen_error_class} if self is frozen" do
str = "cold".freeze
str.frozen?.should be_true
- lambda { str.setbyte(3,96) }.should raise_error(frozen_error_class)
+ -> { str.setbyte(3,96) }.should raise_error(frozen_error_class)
end
it "raises a TypeError unless the second argument is an Integer" do
- lambda { "a".setbyte(0,'a') }.should raise_error(TypeError)
+ -> { "a".setbyte(0,'a') }.should raise_error(TypeError)
end
it "calls #to_int to convert the index" do