We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b0fb88 commit 1a5805eCopy full SHA for 1a5805e
spec/ruby/core/string/shared/slice.rb
@@ -159,6 +159,11 @@
159
-> { "hello".send(@method, 0, bignum_value) }.should raise_error(RangeError)
160
end
161
162
+ it "raises a RangeError if the index or length is too small" do
163
+ -> { "hello".send(@method, -bignum_value, 1) }.should raise_error(RangeError)
164
+ -> { "hello".send(@method, 0, -bignum_value) }.should raise_error(RangeError)
165
+ end
166
+
167
it "returns String instances" do
168
s = StringSpecs::MyString.new("hello")
169
s.send(@method, 0,0).should be_an_instance_of(String)
0 commit comments