Closed declanvk closed 7 years ago
Hi Declan!
Thanks for the bug report. I wasn't able to reproduce it with 1.1.1:
git co v1.1.1
irb -Ilib -rcoderay
2.4.1 :001 > CodeRay.scan('a: / 1').term
ArgumentError: wrong number of arguments (given 1, expected 2..3)
from /Users/murphy/ruby/coderay/lib/coderay.rb:168:in `scan'
from (irb):1
from /Users/murphy/.rvm/rubies/ruby-2.4.1/bin/irb:11:in `<main>'
2.4.1 :002 > CodeRay.scan('a: / 1', :ruby).term
=> "\e[35ma\e[0m: \e[35m\e[1;35m/\e[0m\e[35m 1\e[0m"
Is it possible that this isn't the exact code you were using?
P.S. maybe some sort of fuzzing would be a cool addition to your testing code
You mean something like this? ;-) It's already part of the extensive test suite. Scanners are pretty much bullet-proof, at least against typical strange code (your example would be a Ruby syntax error).
I apologize for the delay. I think this might have been an issue with a previous version, or maybe something to do with the pry debugger on top. I'm no longer in a position to debug the error I submitted, but thank you for this response.
P.S. Thats a pretty cool test you have there.
Hello, I'm running into an issue while using the pry debugger (version 0.10.4) that in turns uses the coderay gem (version 1.1.1) for syntax highlighting. Inputting
a: / 1
leads to the pry debugger exiting with the following error:Checking to make sure that it wasn't an issue with
pry
I reproduced the issue with the following script:which produced a similar, if truncated, error:
I can't say that I know very much about this software, so I did not submit a PR with this issue.
Thank you for your time, Declan Kelly
P.S. maybe some sort of fuzzing would be a cool addition to your testing code