[前][次][番号順一覧][スレッド一覧]

ruby-changes:54907

From: eregon <ko1@a...>
Date: Fri, 22 Feb 2019 00:46:46 +0900 (JST)
Subject: [ruby-changes:54907] eregon:r67112 (trunk): Update to ruby/spec@7a16e01

eregon	2019-02-22 00:38:59 +0900 (Fri, 22 Feb 2019)

  New Revision: 67112

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67112

  Log:
    Update to ruby/spec@7a16e01

  Added files:
    trunk/spec/ruby/.mspec.constants
    trunk/spec/ruby/core/enumerator/lazy/chunk_while_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/slice_after_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/slice_before_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/slice_when_spec.rb
  Modified files:
    trunk/spec/ruby/.travis.yml
    trunk/spec/ruby/README.md
    trunk/spec/ruby/core/array/each_spec.rb
    trunk/spec/ruby/core/enumerable/chain_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/chunk_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/drop_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/drop_while_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/force_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/grep_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/grep_v_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/lazy_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/reject_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/shared/collect.rb
    trunk/spec/ruby/core/enumerator/lazy/shared/collect_concat.rb
    trunk/spec/ruby/core/enumerator/lazy/shared/select.rb
    trunk/spec/ruby/core/enumerator/lazy/shared/to_enum.rb
    trunk/spec/ruby/core/enumerator/lazy/uniq_spec.rb
    trunk/spec/ruby/core/enumerator/lazy/zip_spec.rb
    trunk/spec/ruby/core/exception/cause_spec.rb
    trunk/spec/ruby/core/exception/dup_spec.rb
    trunk/spec/ruby/core/exception/full_message_spec.rb
    trunk/spec/ruby/core/file/split_spec.rb
    trunk/spec/ruby/core/integer/div_spec.rb
    trunk/spec/ruby/core/integer/uminus_spec.rb
    trunk/spec/ruby/core/io/ioctl_spec.rb
    trunk/spec/ruby/core/kernel/extend_spec.rb
    trunk/spec/ruby/core/kernel/fail_spec.rb
    trunk/spec/ruby/core/kernel/instance_variable_set_spec.rb
    trunk/spec/ruby/core/kernel/warn_spec.rb
    trunk/spec/ruby/core/marshal/dump_spec.rb
    trunk/spec/ruby/core/module/autoload_spec.rb
    trunk/spec/ruby/core/module/fixtures/autoload_subclass.rb
    trunk/spec/ruby/core/module/remove_method_spec.rb
    trunk/spec/ruby/core/numeric/shared/step.rb
    trunk/spec/ruby/core/numeric/step_spec.rb
    trunk/spec/ruby/core/range/step_spec.rb
    trunk/spec/ruby/core/string/shared/codepoints.rb
    trunk/spec/ruby/core/string/split_spec.rb
    trunk/spec/ruby/core/struct/inspect_spec.rb
    trunk/spec/ruby/core/thread/new_spec.rb
    trunk/spec/ruby/core/time/shared/gmt_offset.rb
    trunk/spec/ruby/core/tracepoint/disable_spec.rb
    trunk/spec/ruby/core/tracepoint/enable_spec.rb
    trunk/spec/ruby/core/tracepoint/enabled_spec.rb
    trunk/spec/ruby/core/tracepoint/inspect_spec.rb
    trunk/spec/ruby/core/tracepoint/new_spec.rb
    trunk/spec/ruby/core/tracepoint/path_spec.rb
    trunk/spec/ruby/core/tracepoint/self_spec.rb
    trunk/spec/ruby/core/tracepoint/trace_spec.rb
    trunk/spec/ruby/default.mspec
    trunk/spec/ruby/language/alias_spec.rb
    trunk/spec/ruby/language/class_spec.rb
    trunk/spec/ruby/language/fixtures/super.rb
    trunk/spec/ruby/language/for_spec.rb
    trunk/spec/ruby/language/heredoc_spec.rb
    trunk/spec/ruby/language/return_spec.rb
    trunk/spec/ruby/language/super_spec.rb
    trunk/spec/ruby/library/bigdecimal/BigDecimal_spec.rb
    trunk/spec/ruby/library/bigdecimal/minus_spec.rb
    trunk/spec/ruby/library/bigdecimal/plus_spec.rb
    trunk/spec/ruby/library/ipaddr/operator_spec.rb
    trunk/spec/ruby/library/mathn/mathn_spec.rb
    trunk/spec/ruby/library/rbconfig/rbconfig_spec.rb
    trunk/spec/ruby/library/stringio/puts_spec.rb
    trunk/spec/ruby/library/yaml/fixtures/example_class.rb
    trunk/spec/ruby/library/yaml/to_yaml_spec.rb
    trunk/spec/ruby/optional/capi/ext/string_spec.c
    trunk/spec/ruby/optional/capi/string_spec.rb
    trunk/spec/ruby/security/cve_2018_6914_spec.rb
    trunk/spec/ruby/shared/kernel/raise.rb
Index: spec/ruby/language/return_spec.rb
===================================================================
--- spec/ruby/language/return_spec.rb	(revision 67111)
+++ spec/ruby/language/return_spec.rb	(revision 67112)
@@ -413,7 +413,7 @@ describe "The return keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/return_spec.rb#L413
         ruby_version_is ""..."2.5" do
           it "is allowed" do
             File.write(@filename, <<-END_OF_CODE)
-              class A
+              class ReturnSpecs::A
                 ScratchPad << "before return"
                 return
 
@@ -429,7 +429,7 @@ describe "The return keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/return_spec.rb#L429
         ruby_version_is "2.5" do
           it "raises a SyntaxError" do
             File.write(@filename, <<-END_OF_CODE)
-              class A
+              class ReturnSpecs::A
                 ScratchPad << "before return"
                 return
 
@@ -445,7 +445,7 @@ describe "The return keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/return_spec.rb#L445
       describe "within a block within a class" do
         it "is allowed" do
           File.write(@filename, <<-END_OF_CODE)
-            class A
+            class ReturnSpecs::A
               ScratchPad << "before return"
               1.times { return }
               ScratchPad << "after return"
Index: spec/ruby/language/alias_spec.rb
===================================================================
--- spec/ruby/language/alias_spec.rb	(revision 67111)
+++ spec/ruby/language/alias_spec.rb	(revision 67112)
@@ -204,7 +204,7 @@ describe "The alias keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/alias_spec.rb#L204
   end
 
   it "operates on methods with splat arguments defined in a superclass using text block for class eval" do
-    class Sub < AliasObject;end
+    subclass = Class.new(AliasObject)
     AliasObject.class_eval <<-code
       def test(*args)
         4
@@ -215,7 +215,7 @@ describe "The alias keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/alias_spec.rb#L215
       alias test_without_check test
       alias test test_with_check
     code
-    Sub.new.test("testing").should == 4
+    subclass.new.test("testing").should == 4
   end
 
   it "is not allowed against Fixnum or String instances" do
Index: spec/ruby/language/for_spec.rb
===================================================================
--- spec/ruby/language/for_spec.rb	(revision 67111)
+++ spec/ruby/language/for_spec.rb	(revision 67112)
@@ -32,14 +32,13 @@ describe "The for expression" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/for_spec.rb#L32
   end
 
   it "iterates over any object responding to 'each'" do
-    class XYZ
-      def each
-        (0..10).each { |i| yield i }
-      end
+    obj = Object.new
+    def obj.each
+      (0..10).each { |i| yield i }
     end
 
     j = 0
-    for i in XYZ.new
+    for i in obj
       j += i
     end
     j.should == 55
Index: spec/ruby/language/fixtures/super.rb
===================================================================
--- spec/ruby/language/fixtures/super.rb	(revision 67111)
+++ spec/ruby/language/fixtures/super.rb	(revision 67112)
@@ -1,4 +1,4 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/fixtures/super.rb#L1
-module Super
+module SuperSpecs
   module S1
     class A
       def foo(a)
Index: spec/ruby/language/super_spec.rb
===================================================================
--- spec/ruby/language/super_spec.rb	(revision 67111)
+++ spec/ruby/language/super_spec.rb	(revision 67112)
@@ -3,71 +3,71 @@ require_relative 'fixtures/super' https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/super_spec.rb#L3
 
 describe "The super keyword" do
   it "calls the method on the calling class" do
-    Super::S1::A.new.foo([]).should == ["A#foo","A#bar"]
-    Super::S1::A.new.bar([]).should == ["A#bar"]
-    Super::S1::B.new.foo([]).should == ["B#foo","A#foo","B#bar","A#bar"]
-    Super::S1::B.new.bar([]).should == ["B#bar","A#bar"]
+    SuperSpecs::S1::A.new.foo([]).should == ["A#foo","A#bar"]
+    SuperSpecs::S1::A.new.bar([]).should == ["A#bar"]
+    SuperSpecs::S1::B.new.foo([]).should == ["B#foo","A#foo","B#bar","A#bar"]
+    SuperSpecs::S1::B.new.bar([]).should == ["B#bar","A#bar"]
   end
 
   it "searches the full inheritance chain" do
-    Super::S2::B.new.foo([]).should == ["B#foo","A#baz"]
-    Super::S2::B.new.baz([]).should == ["A#baz"]
-    Super::S2::C.new.foo([]).should == ["B#foo","C#baz","A#baz"]
-    Super::S2::C.new.baz([]).should == ["C#baz","A#baz"]
+    SuperSpecs::S2::B.new.foo([]).should == ["B#foo","A#baz"]
+    SuperSpecs::S2::B.new.baz([]).should == ["A#baz"]
+    SuperSpecs::S2::C.new.foo([]).should == ["B#foo","C#baz","A#baz"]
+    SuperSpecs::S2::C.new.baz([]).should == ["C#baz","A#baz"]
   end
 
   it "searches class methods" do
-    Super::S3::A.new.foo([]).should == ["A#foo"]
-    Super::S3::A.foo([]).should == ["A.foo"]
-    Super::S3::A.bar([]).should == ["A.bar","A.foo"]
-    Super::S3::B.new.foo([]).should == ["A#foo"]
-    Super::S3::B.foo([]).should == ["B.foo","A.foo"]
-    Super::S3::B.bar([]).should == ["B.bar","A.bar","B.foo","A.foo"]
+    SuperSpecs::S3::A.new.foo([]).should == ["A#foo"]
+    SuperSpecs::S3::A.foo([]).should == ["A.foo"]
+    SuperSpecs::S3::A.bar([]).should == ["A.bar","A.foo"]
+    SuperSpecs::S3::B.new.foo([]).should == ["A#foo"]
+    SuperSpecs::S3::B.foo([]).should == ["B.foo","A.foo"]
+    SuperSpecs::S3::B.bar([]).should == ["B.bar","A.bar","B.foo","A.foo"]
   end
 
   it "calls the method on the calling class including modules" do
-    Super::MS1::A.new.foo([]).should == ["ModA#foo","ModA#bar"]
-    Super::MS1::A.new.bar([]).should == ["ModA#bar"]
-    Super::MS1::B.new.foo([]).should == ["B#foo","ModA#foo","ModB#bar","ModA#bar"]
-    Super::MS1::B.new.bar([]).should == ["ModB#bar","ModA#bar"]
+    SuperSpecs::MS1::A.new.foo([]).should == ["ModA#foo","ModA#bar"]
+    SuperSpecs::MS1::A.new.bar([]).should == ["ModA#bar"]
+    SuperSpecs::MS1::B.new.foo([]).should == ["B#foo","ModA#foo","ModB#bar","ModA#bar"]
+    SuperSpecs::MS1::B.new.bar([]).should == ["ModB#bar","ModA#bar"]
   end
 
   it "searches the full inheritance chain including modules" do
-    Super::MS2::B.new.foo([]).should == ["ModB#foo","A#baz"]
-    Super::MS2::B.new.baz([]).should == ["A#baz"]
-    Super::MS2::C.new.baz([]).should == ["C#baz","A#baz"]
-    Super::MS2::C.new.foo([]).should == ["ModB#foo","C#baz","A#baz"]
+    SuperSpecs::MS2::B.new.foo([]).should == ["ModB#foo","A#baz"]
+    SuperSpecs::MS2::B.new.baz([]).should == ["A#baz"]
+    SuperSpecs::MS2::C.new.baz([]).should == ["C#baz","A#baz"]
+    SuperSpecs::MS2::C.new.foo([]).should == ["ModB#foo","C#baz","A#baz"]
   end
 
   it "can resolve to different methods in an included module method" do
-    Super::MultiSuperTargets::A.new.foo.should == :BaseA
-    Super::MultiSuperTargets::B.new.foo.should == :BaseB
+    SuperSpecs::MultiSuperTargets::A.new.foo.should == :BaseA
+    SuperSpecs::MultiSuperTargets::B.new.foo.should == :BaseB
   end
 
   it "searches class methods including modules" do
-    Super::MS3::A.new.foo([]).should == ["A#foo"]
-    Super::MS3::A.foo([]).should == ["ModA#foo"]
-    Super::MS3::A.bar([]).should == ["ModA#bar","ModA#foo"]
-    Super::MS3::B.new.foo([]).should == ["A#foo"]
-    Super::MS3::B.foo([]).should == ["B.foo","ModA#foo"]
-    Super::MS3::B.bar([]).should == ["B.bar","ModA#bar","B.foo","ModA#foo"]
+    SuperSpecs::MS3::A.new.foo([]).should == ["A#foo"]
+    SuperSpecs::MS3::A.foo([]).should == ["ModA#foo"]
+    SuperSpecs::MS3::A.bar([]).should == ["ModA#bar","ModA#foo"]
+    SuperSpecs::MS3::B.new.foo([]).should == ["A#foo"]
+    SuperSpecs::MS3::B.foo([]).should == ["B.foo","ModA#foo"]
+    SuperSpecs::MS3::B.bar([]).should == ["B.bar","ModA#bar","B.foo","ModA#foo"]
   end
 
   it "searches BasicObject from a module for methods defined there" do
-    Super::IncludesFromBasic.new.__send__(:foobar).should == 43
+    SuperSpecs::IncludesFromBasic.new.__send__(:foobar).should == 43
   end
 
   it "searches BasicObject through another module for methods defined there" do
-    Super::IncludesIntermediate.new.__send__(:foobar).should == 42
+    SuperSpecs::IncludesIntermediate.new.__send__(:foobar).should == 42
   end
 
   it "calls the correct method when the method visibility is modified" do
-    Super::MS4::A.new.example.should == 5
+    SuperSpecs::MS4::A.new.example.should == 5
   end
 
   it "calls the correct method when the superclass argument list is different from the subclass" do
-    Super::S4::A.new.foo([]).should == ["A#foo"]
-    Super::S4::B.new.foo([],"test").should == ["B#foo(a,test)", "A#foo"]
+    SuperSpecs::S4::A.new.foo([]).should == ["A#foo"]
+    SuperSpecs::S4::B.new.foo([],"test").should == ["B#foo(a,test)", "A#foo"]
   end
 
   it "raises an error error when super method does not exist" do
@@ -103,15 +103,15 @@ describe "The super keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/super_spec.rb#L103
   end
 
   it "calls the superclass method when in a block" do
-    Super::S6.new.here.should == :good
+    SuperSpecs::S6.new.here.should == :good
   end
 
   it "calls the superclass method when initial method is defined_method'd" do
-    Super::S7.new.here.should == :good
+    SuperSpecs::S7.new.here.should == :good
   end
 
   it "can call through a define_method multiple times (caching check)" do
-    obj = Super::S7.new
+    obj = SuperSpecs::S7.new
 
     2.times do
       obj.here.should == :good
@@ -155,20 +155,20 @@ describe "The super keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/super_spec.rb#L155
 
   # Rubinius ticket github#157
   it "calls method_missing when a superclass method is not found" do
-    Super::MM_B.new.is_a?(Hash).should == false
+    SuperSpecs::MM_B.new.is_a?(Hash).should == false
   end
 
   # Rubinius ticket github#180
   it "respects the original module a method is aliased from" do
-    Super::Alias3.new.name3.should == [:alias2, :alias1]
+    SuperSpecs::Alias3.new.name3.should == [:alias2, :alias1]
   end
 
   it "sees the included version of a module a method is alias from" do
-    Super::AliasWithSuper::Trigger.foo.should == [:b, :a]
+    SuperSpecs::AliasWithSuper::Trigger.foo.should == [:b, :a]
   end
 
   it "find super from a singleton class" do
-    obj = Super::SingletonCase::Foo.new
+    obj = SuperSpecs::SingletonCase::Foo.new
     def obj.foobar(array)
       array << :singleton
       super
@@ -177,97 +177,97 @@ describe "The super keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/super_spec.rb#L177
   end
 
   it "finds super on other objects if a singleton class aliased the method" do
-    orig_obj = Super::SingletonAliasCase::Foo.new
+    orig_obj = SuperSpecs::SingletonAliasCase::Foo.new
     orig_obj.alias_on_singleton
     orig_obj.new_foobar([]).should == [:foo, :base]
-    Super::SingletonAliasCase::Foo.new.foobar([]).should == [:foo, :base]
+    SuperSpecs::SingletonAliasCase::Foo.new.foobar([]).should == [:foo, :base]
   end
 
   it "passes along modified rest args when they weren't originally empty" do
-    Super::RestArgsWithSuper::B.new.a("bar").should == ["bar", "foo"]
+    SuperSpecs::RestArgsWithSuper::B.new.a("bar").should == ["bar", "foo"]
   end
 
   it "passes along modified rest args when they were originally empty" do
-    Super::RestArgsWithSuper::B.new.a.should == ["foo"]
+    SuperSpecs::RestArgsWithSuper::B.new.a.should == ["foo"]
   end
 
   # https://bugs.ruby-lang.org/issues/14279
   it "passes along reassigned rest args" do
-    Super::ZSuperWithRestReassigned::B.new.a("bar").should == ["foo"]
+    SuperSpecs::ZSuperWithRestReassigned::B.new.a("bar").should == ["foo"]
   end
 
   # https://bugs.ruby-lang.org/issues/14279
   it "wraps into array and passes along reassigned rest args with non-array scalar value" do
-    Super::ZSuperWithRestReassignedWithScalar::B.new.a("bar").should == ["foo"]
+    SuperSpecs::ZSuperWithRestReassignedWithScalar::B.new.a("bar").should == ["foo"]
   end
 
   it "invokes methods from a chain of anonymous modules" do
-    Super::AnonymousModuleIncludedTwice.new.a([]).should == ["anon", "anon", "non-anon"]
+    SuperSpecs::AnonymousModuleIncludedTwice.new.a([]).should == ["anon", "anon", "non-anon"]
   end
 
   it "without explicit arguments can accept a block but still pass the original arguments" do
-    Super::ZSuperWithBlock::B.new.a.should == 14
+    SuperSpecs::ZSuperWithBlock::B.new.a.should == 14
   end
 
   it "passes along block via reference to method expecting a reference" do
-    Super::ZSuperWithBlock::B.new.b.should == [14, 15]
+    SuperSpecs::ZSuperWithBlock::B.new.b.should == [14, 15]
   end
 
   it "passes along a block via reference to a method that yields" do
-    Super::ZSuperWithBlock::B.new.c.should == 16
+    SuperSpecs::ZSuperWithBlock::B.new.c.should == 16
   end
 
   it "without explicit arguments passes optional arguments that have a default value" do
-    Super::ZSuperWithOptional::B.new.m(1, 2).should == 14
+    SuperSpecs::ZSuperWithOptional::B.new.m(1, 2).should == 14
   end
 
   it "without explicit arguments passes optional arguments that have a non-default value" do
-    Super::ZSuperWithOptional::B.new.m(1, 2, 3).should == 3
+    SuperSpecs::ZSuperWithOptional::B.new.m(1, 2, 3).should == 3
   end
 
   it "without explicit arguments passes optional arguments that have a default value but were modified" do
-    Super::ZSuperWithOptional::C.new.m(1, 2).should == 100
+    SuperSpecs::ZSuperWithOptional::C.new.m(1, 2).should == 100
   end
 
   it "without explicit arguments passes optional arguments that have a non-default value but were modified" do
-    Super::ZSuperWithOptional::C.new.m(1, 2, 3).should == 100
+    SuperSpecs::ZSuperWithOptional::C.new.m(1, 2, 3).should == 100
   end
 
   it "without explicit arguments passes rest arguments" do
-    Super::ZSuperWithRest::B.new.m(1, 2, 3).should == [1, 2, 3]
+    SuperSpecs::ZSuperWithRest::B.new.m(1, 2, 3).should == [1, 2, 3]
   end
 
   it "without explicit arguments passes rest arguments including any modifications" do
-    Super::ZSuperWithRest::B.new.m_modified(1, 2, 3).should == [1, 14, 3]
+    SuperSpecs::ZSuperWithRest::B.new.m_modified(1, 2, 3).should == [1, 14, 3]
   end
 
   it "without explicit arguments passes arguments and rest arguments" do
-    Super::ZSuperWithRestAndOthers::B.new.m(1, 2, 3, 4, 5).should == [3, 4, 5]
+    SuperSpecs::ZSuperWithRestAndOthers::B.new.m(1, 2, 3, 4, 5).should == [3, 4, 5]
   end
 
   it "without explicit arguments passes arguments and rest arguments including any modifications" do
-    Super::ZSuperWithRestAndOthers::B.new.m_modified(1, 2, 3, 4, 5).should == [3, 14, 5]
+    SuperSpecs::ZSuperWithRestAndOthers::B.new.m_modified(1, 2, 3, 4, 5).should == [3, 14, 5]
   end
 
   it "without explicit arguments that are '_'" do
-    Super::ZSuperWithUnderscores::B.new.m(1, 2).should == [1, 2]
+    SuperSpecs::ZSuperWithUnderscores::B.new.m(1, 2).should == [1, 2]
   end
 
   it "without explicit arguments that are '_' including any modifications" do
-    Super::ZSuperWithUnderscores::B.new.m_modified(1, 2).should == [14, 2]
+    SuperSpecs::ZSuperWithUnderscores::B.new.m_modified(1, 2).should == [14, 2]
   end
 
   describe 'when using keyword arguments' do
     before :each do
-      @req  = Super::Keywords::RequiredArguments.new
-      @opts = Super::Keywords::OptionalArguments.new
-      @etc  = Super::Keywords::PlaceholderArguments.new
-
-      @req_and_opts = Super::Keywords::RequiredAndOptionalArguments.new
-      @req_and_etc  = Super::Keywords::RequiredAndPlaceholderArguments.new
-      @opts_and_etc = Super::Keywords::OptionalAndPlaceholderArguments.new
+      @req  = SuperSpecs::Keywords::RequiredArguments.new
+      @opts = SuperSpecs::Keywords::OptionalArguments.new
+      @etc  = SuperSpecs::Keywords::PlaceholderArguments.new
+
+      @req_and_opts = SuperSpecs::Keywords::RequiredAndOptionalArguments.new
+      @req_and_etc  = SuperSpecs::Keywords::RequiredAndPlaceholderArguments.new
+      @opts_and_etc = SuperSpecs::Keywords::OptionalAndPlaceholderArguments.new
 
-      @req_and_opts_and_etc = Super::Keywords::RequiredAndOptionalAndPlaceholderArguments.new
+      @req_and_opts_and_etc = SuperSpecs::Keywords::RequiredAndOptionalAndPlaceholderArguments.new
     end
 
     it 'does not pass any arguments to the parent when none are given' do
@@ -303,15 +303,15 @@ describe "The super keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/super_spec.rb#L303
 
   describe 'when using regular and keyword arguments' do
     before :each do
-      @req  = Super::RegularAndKeywords::RequiredArguments.new
-      @opts = Super::RegularAndKeywords::OptionalArguments.new
-      @etc  = Super::RegularAndKeywords::PlaceholderArguments.new
-
-      @req_and_opts = Super::RegularAndKeywords::RequiredAndOptionalArguments.new
-      @req_and_etc  = Super::RegularAndKeywords::RequiredAndPlaceholderArguments.new
-      @opts_and_etc = Super::RegularAndKeywords::OptionalAndPlaceholderArguments.new
+      @req  = SuperSpecs::RegularAndKeywords::RequiredArguments.new
+      @opts = SuperSpecs::RegularAndKeywords::OptionalArguments.new
+      @etc  = SuperSpecs::RegularAndKeywords::PlaceholderArguments.new
+
+      @req_and_opts = SuperSpecs::RegularAndKeywords::RequiredAndOptionalArguments.new
+      @req_and_etc  = SuperSpecs::RegularAndKeywords::RequiredAndPlaceholderArguments.new
+      @opts_and_etc = SuperSpecs::RegularAndKeywords::OptionalAndPlaceholderArguments.new
 
-      @req_and_opts_and_etc = Super::RegularAndKeywords::RequiredAndOptionalAndPlaceholderArguments.new
+      @req_and_opts_and_etc = SuperSpecs::RegularAndKeywords::RequiredAndOptionalAndPlaceholderArguments.new
     end
 
     it 'passes only required regular arguments to the parent when no optional keyword arguments are given' do
@@ -347,7 +347,7 @@ describe "The super keyword" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/super_spec.rb#L347
 
   describe 'when using splat and keyword arguments' do
     before :each do
-      @all = Super::SplatAndKeywords::AllArguments.new
+      @all = SuperSpecs::SplatAndKeywords::AllArguments.new
     end
 
     it 'does not pass any arguments to the parent when none are given' do
Index: spec/ruby/language/class_spec.rb
===================================================================
--- spec/ruby/language/class_spec.rb	(revision 67111)
+++ spec/ruby/language/class_spec.rb	(revision 67112)
@@ -210,16 +210,16 @@ describe "A class definition" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/class_spec.rb#L210
   describe "within a block creates a new class in the lexical scope" do
     it "for named classes at the toplevel" do
       klass = Class.new do
-        class Howdy
+        class CS_CONST_CLASS_SPECS
         end
 
         def self.get_class_name
-          Howdy.name
+          CS_CONST_CLASS_SPECS.name
         end
       end
 
-      Howdy.name.should == 'Howdy'
-      klass.get_class_name.should == 'Howdy'
+      klass.get_class_name.should == 'CS_CONST_CLASS_SPECS'
+      ::CS_CONST_CLASS_SPECS.name.should == 'CS_CONST_CLASS_SPECS'
     end
 
     it "for named classes in a module" do
Index: spec/ruby/language/heredoc_spec.rb
===================================================================
--- spec/ruby/language/heredoc_spec.rb	(revision 67111)
+++ spec/ruby/language/heredoc_spec.rb	(revision 67112)
@@ -13,6 +13,7 @@ describe "Heredoc string" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/language/heredoc_spec.rb#L13
 foo bar#{@ip}
 HERE
     s.should == "foo barxxx\n"
+    s.encoding.should == Encoding::US_ASCII
   end
 
   it 'allow HEREDOC with <<"identifier", interpolat (... truncated)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]