Fixed detection of numbers in ruby

Made tests like this passing:
```ruby
answer = valid?42 && valid?CONST && ?A && ?A.ord
```