Skip to content

Commit 32dab73

Browse files
nobuheadius
authored andcommitted
Use the exception class mentioned in the doc
Instead of an undocumented constant.
1 parent aff25a1 commit 32dab73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/stringscanner/unscan_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
@s.pos.should == pos
2222
end
2323

24-
it "raises a ScanError when the previous match had failed" do
25-
-> { @s.unscan }.should raise_error(ScanError)
26-
-> { @s.scan(/\d/); @s.unscan }.should raise_error(ScanError)
24+
it "raises a StringScanner::Error when the previous match had failed" do
25+
-> { @s.unscan }.should raise_error(StringScanner::Error)
26+
-> { @s.scan(/\d/); @s.unscan }.should raise_error(StringScanner::Error)
2727
end
2828
end

0 commit comments

Comments
 (0)