Skip to content

Commit 5231ede

Browse files
nirvdrumeregon
authored andcommitted
Fix String#lstrip! and String#rstrip! specs to call a valid method.
1 parent 27eb468 commit 5231ede

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/ruby/core/string/lstrip_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@
5454
it "raises an ArgumentError if the first codepoint is invalid" do
5555
s = "\xDFabc".force_encoding(Encoding::UTF_8)
5656
s.valid_encoding?.should be_false
57-
-> { s.send(@method) { } }.should raise_error(ArgumentError)
57+
-> { s.lstrip! }.should raise_error(ArgumentError)
5858
end
5959
end

spec/ruby/core/string/rstrip_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@
5050
it "raises an ArgumentError if the last codepoint is invalid" do
5151
s = "abc\xDF".force_encoding(Encoding::UTF_8)
5252
s.valid_encoding?.should be_false
53-
-> { s.send(@method) { } }.should raise_error(ArgumentError)
53+
-> { s.rstrip! }.should raise_error(ArgumentError)
5454
end
5555
end

0 commit comments

Comments
 (0)