Literally, this is showing up in irb
and in my application code. Suddenly ruby 3.0.0 is no longer recognizing Boolean
This worked a few weeks ago, it must have appeared after an OS update
$ irb
3.0.0 :001 > String
=> String
3.0.0 :002 > Boolean
Traceback (most recent call last):
4: from /Users/aronlilland/.rvm/rubies/ruby-3.0.0/bin/irb:23:in `<main>'
3: from /Users/aronlilland/.rvm/rubies/ruby-3.0.0/bin/irb:23:in `load'
2: from /Users/aronlilland/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/irb-1.3.0/exe/irb:11:in `<top (required)>'
1: from (irb):2:in `<main>'
NameError (uninitialized constant Boolean)
env
- ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin21]
- rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
- MacOS 12.5.1 (2.4 GHz 8-Core Intel Core i9 processor)
Troubleshooting steps already taken:
- uninstalled and reinstalled using RVM
rvm uninstall 3.0.0
thenrvm install 3.0.0
CodePudding user response:
Ruby has never had a Boolean
type. The Boolean constants true
and false
are, respectively, of types TrueClass
and FalseClass
, and both inherit directly from Object
. There is not, and has never been, a type called Boolean
in core Ruby.