-->

Ruby 2.4 has deprecated toplevel constants TRUE, FALSE and NIL | BigBinary Blog

2017-06-19 Akshay Vishnoi

This blog is part of our Ruby 2.4 series.

Ruby has top level constants like TRUE, FALSE and NIL. These constants are just synonyms for true, false and nil respectively.

In Ruby 2.4, these constants are deprecated and will be removed in future version.

# Ruby 2.3

2.3.1 :001 > TRUE
 => true
2.3.1 :002 > FALSE
 => false
2.3.1 :003 > NIL
 => nil
# Ruby 2.4

2.4.0 :001 > TRUE
(irb):1: warning: constant ::TRUE is deprecated
 => true
2.4.0 :002 > FALSE
(irb):2: warning: constant ::FALSE is deprecated
 => false
2.4.0 :003 > NIL
(irb):3: warning: constant ::NIL is deprecated
 => nil

2017-06-19 Akshay Vishnoi

Yazıda Geçen Linkler
  1. bigbinary.com
  2. ruby-lang.org

http://blog.bigbinary.com/2017/06/19/ruby-2-4-has-depecated-constants-true-false-and-nil.html