ruby-changes:64389
From: Nobuyoshi <ko1@a...>
Date: Mon, 21 Dec 2020 01:20:13 +0900 (JST)
Subject: [ruby-changes:64389] ad534a677a (master): Fixnum as a Symbol was an old feature until 1.6
https://git.ruby-lang.org/ruby.git/commit/?id=ad534a677a From ad534a677a6df7437c934440b35affa88ce3648a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 21 Dec 2020 00:20:06 +0900 Subject: Fixnum as a Symbol was an old feature until 1.6 diff --git a/spec/ruby/core/module/attr_accessor_spec.rb b/spec/ruby/core/module/attr_accessor_spec.rb index 665a934..290599e 100644 --- a/spec/ruby/core/module/attr_accessor_spec.rb +++ b/spec/ruby/core/module/attr_accessor_spec.rb @@ -36,7 +36,7 @@ describe "Module#attr_accessor" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/attr_accessor_spec.rb#L36 -> { true.spec_attr_accessor = "a" }.should raise_error(RuntimeError) end - it "converts non string/symbol/fixnum names to strings using to_str" do + it "converts non string/symbol names to strings using to_str" do (o = mock('test')).should_receive(:to_str).any_number_of_times.and_return("test") c = Class.new do attr_accessor o diff --git a/spec/ruby/core/module/attr_reader_spec.rb b/spec/ruby/core/module/attr_reader_spec.rb index e16b7ba..e40ae88 100644 --- a/spec/ruby/core/module/attr_reader_spec.rb +++ b/spec/ruby/core/module/attr_reader_spec.rb @@ -32,7 +32,7 @@ describe "Module#attr_reader" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/attr_reader_spec.rb#L32 -> { true.instance_variable_set("@spec_attr_reader", "a") }.should raise_error(RuntimeError) end - it "converts non string/symbol/fixnum names to strings using to_str" do + it "converts non string/symbol names to strings using to_str" do (o = mock('test')).should_receive(:to_str).any_number_of_times.and_return("test") c = Class.new do attr_reader o diff --git a/spec/ruby/core/module/attr_spec.rb b/spec/ruby/core/module/attr_spec.rb index 060d072..55c8a7d 100644 --- a/spec/ruby/core/module/attr_spec.rb +++ b/spec/ruby/core/module/attr_spec.rb @@ -124,7 +124,7 @@ describe "Module#attr" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/attr_spec.rb#L124 -> { c.new.bar }.should raise_error(NoMethodError) end - it "converts non string/symbol/fixnum names to strings using to_str" do + it "converts non string/symbol names to strings using to_str" do (o = mock('test')).should_receive(:to_str).any_number_of_times.and_return("test") Class.new { attr o }.new.respond_to?("test").should == true end diff --git a/spec/ruby/core/module/attr_writer_spec.rb b/spec/ruby/core/module/attr_writer_spec.rb index 59d8b7b..056cfcf 100644 --- a/spec/ruby/core/module/attr_writer_spec.rb +++ b/spec/ruby/core/module/attr_writer_spec.rb @@ -32,7 +32,7 @@ describe "Module#attr_writer" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/attr_writer_spec.rb#L32 -> { true.spec_attr_writer = "a" }.should raise_error(RuntimeError) end - it "converts non string/symbol/fixnum names to strings using to_str" do + it "converts non string/symbol names to strings using to_str" do (o = mock('test')).should_receive(:to_str).any_number_of_times.and_return("test") c = Class.new do attr_writer o diff --git a/spec/ruby/core/module/class_variable_defined_spec.rb b/spec/ruby/core/module/class_variable_defined_spec.rb index f867d38..c0f2072 100644 --- a/spec/ruby/core/module/class_variable_defined_spec.rb +++ b/spec/ruby/core/module/class_variable_defined_spec.rb @@ -51,7 +51,7 @@ describe "Module#class_variable_defined?" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/class_variable_defined_spec.rb#L51 }.should raise_error(NameError) end - it "converts a non string/symbol/fixnum name to string using to_str" do + it "converts a non string/symbol name to string using to_str" do c = Class.new { class_variable_set :@@class_var, "test" } (o = mock('@@class_var')).should_receive(:to_str).and_return("@@class_var") c.class_variable_defined?(o).should == true diff --git a/spec/ruby/core/module/class_variable_get_spec.rb b/spec/ruby/core/module/class_variable_get_spec.rb index 79d22a5..e5d0673 100644 --- a/spec/ruby/core/module/class_variable_get_spec.rb +++ b/spec/ruby/core/module/class_variable_get_spec.rb @@ -60,7 +60,7 @@ describe "Module#class_variable_get" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/class_variable_get_spec.rb#L60 -> { c.send(:class_variable_get, "@invalid_name") }.should raise_error(NameError) end - it "converts a non string/symbol/fixnum name to string using to_str" do + it "converts a non string/symbol name to string using to_str" do c = Class.new { class_variable_set :@@class_var, "test" } (o = mock('@@class_var')).should_receive(:to_str).and_return("@@class_var") c.send(:class_variable_get, o).should == "test" diff --git a/spec/ruby/core/module/class_variable_set_spec.rb b/spec/ruby/core/module/class_variable_set_spec.rb index 85759a2..63f32f5 100644 --- a/spec/ruby/core/module/class_variable_set_spec.rb +++ b/spec/ruby/core/module/class_variable_set_spec.rb @@ -45,7 +45,7 @@ describe "Module#class_variable_set" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/class_variable_set_spec.rb#L45 }.should raise_error(NameError) end - it "converts a non string/symbol/fixnum name to string using to_str" do + it "converts a non string/symbol name to string using to_str" do (o = mock('@@class_var')).should_receive(:to_str).and_return("@@class_var") c = Class.new c.send(:class_variable_set, o, "test") diff --git a/spec/ruby/core/module/method_defined_spec.rb b/spec/ruby/core/module/method_defined_spec.rb index c2a8702..dccee87 100644 --- a/spec/ruby/core/module/method_defined_spec.rb +++ b/spec/ruby/core/module/method_defined_spec.rb @@ -30,7 +30,7 @@ describe "Module#method_defined?" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/module/method_defined_spec.rb#L30 m.method_defined?(:module_specs_public_method_on_kernel).should be_false end - it "raises a TypeError when the given object is not a string/symbol/fixnum" do + it "raises a TypeError when the given object is not a string/symbol" do c = Class.new o = mock('123') -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/