summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/byterindex_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/byterindex_spec.rb')
-rw-r--r--spec/ruby/core/string/byterindex_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/string/byterindex_spec.rb b/spec/ruby/core/string/byterindex_spec.rb
index 983222e35d..569820463d 100644
--- a/spec/ruby/core/string/byterindex_spec.rb
+++ b/spec/ruby/core/string/byterindex_spec.rb
@@ -184,7 +184,7 @@ describe "String#byterindex with String" do
end
it "raises a TypeError when given offset is nil" do
- -> { "str".byterindex("st", nil) }.should raise_error(TypeError)
+ -> { "str".byterindex("st", nil) }.should.raise(TypeError)
end
it "handles a substring in a superset encoding" do
@@ -338,7 +338,7 @@ describe "String#byterindex with Regexp" do
end
it "raises a TypeError when given offset is nil" do
- -> { "str".byterindex(/../, nil) }.should raise_error(TypeError)
+ -> { "str".byterindex(/../, nil) }.should.raise(TypeError)
end
it "returns the reverse byte index of a multibyte character" do