summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-17 17:35:17 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-17 17:35:17 +0900
commit62554ca97812b454e78a0a9daf6e962ff7a2f589 (patch)
tree43390bbafa893bc204389edf0c191ad3f0928475 /spec/ruby
parent3152977b31b64dde776724188bdaa927b07d524d (diff)
Removed NIL/TRUE/FALSE
Deprerecated constants which had been warned since 2.4.
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/language/predefined_spec.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/spec/ruby/language/predefined_spec.rb b/spec/ruby/language/predefined_spec.rb
index 970071eccd..b0616da19b 100644
--- a/spec/ruby/language/predefined_spec.rb
+++ b/spec/ruby/language/predefined_spec.rb
@@ -1091,8 +1091,6 @@ The following constants are defined by the Ruby interpreter.
DATA IO If the main program file contains the directive __END__, then
the constant DATA will be initialized so that reading from it will
return lines following __END__ from the source file.
-FALSE FalseClass Synonym for false.
-NIL NilClass Synonym for nil.
RUBY_PLATFORM String The identifier of the platform running this program. This string
is in the same form as the platform identifier used by the GNU
configure utility (which is not a coincidence).
@@ -1110,31 +1108,9 @@ SCRIPT_LINES__ Hash If a constant SCRIPT_LINES__ is defined and ref
the value.
TOPLEVEL_BINDING Binding A Binding object representing the binding at Ruby’s top level—
the level where programs are initially executed.
-TRUE TrueClass Synonym for true.
=end
describe "The predefined global constants" do
- it "includes TRUE" do
- Object.const_defined?(:TRUE).should == true
- -> {
- TRUE.should equal(true)
- }.should complain(/constant ::TRUE is deprecated/)
- end
-
- it "includes FALSE" do
- Object.const_defined?(:FALSE).should == true
- -> {
- FALSE.should equal(false)
- }.should complain(/constant ::FALSE is deprecated/)
- end
-
- it "includes NIL" do
- Object.const_defined?(:NIL).should == true
- -> {
- NIL.should equal(nil)
- }.should complain(/constant ::NIL is deprecated/)
- end
-
it "includes STDIN" do
Object.const_defined?(:STDIN).should == true
end