mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue