Closed jfahrenkrug closed 13 years ago
@bkerley What do you think of this? Happy to merge if you think it's a good idea.
If the tests pass, I'm fine with it.
On Jul 19, 2011, at 10:59, jlongreply@reply.github.com wrote:
@bkerley What do you think of this? Happy to merge if you think it's a good idea.
Reply to this email directly or view it on GitHub: https://github.com/jlong/radius/pull/10#issuecomment-1608130
I ran the tests and they pass, but please feel free to double check!
The tests fail with ruby 1.8.6 because Fixnum doesn't have the ord method. That is easily fixed, though. Just adding this helps:
class Fixnum
def ord
self
end
end
Because all the ord method does is return the number itself, see: http://www.ruby-doc.org/core-1.8.7/classes/Integer.html#M000062
I ran ragel with the -F1 option which produces twice as fast code for the scanner. I added a performance test that demonstrates the speed improvement. It is still a lot slower than the old parser, though.