mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Use the exception class mentioned in the doc
Instead of an undocumented constant.
This commit is contained in:
parent
53f1fc2546
commit
49b06f40af
Notes:
git
2025-11-05 04:53:51 +00:00
@ -21,8 +21,8 @@ describe "StringScanner#unscan" do
|
||||
@s.pos.should == pos
|
||||
end
|
||||
|
||||
it "raises a ScanError when the previous match had failed" do
|
||||
-> { @s.unscan }.should raise_error(ScanError)
|
||||
-> { @s.scan(/\d/); @s.unscan }.should raise_error(ScanError)
|
||||
it "raises a StringScanner::Error when the previous match had failed" do
|
||||
-> { @s.unscan }.should raise_error(StringScanner::Error)
|
||||
-> { @s.scan(/\d/); @s.unscan }.should raise_error(StringScanner::Error)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user