Fixed detection of numbers in ruby

Made tests like this passing:
```ruby
answer = valid?42
```