Project

General

Profile

Feature #9614 ยป 0001-adjust-tests-to-account-for-unsorted-methods.patch

normalperson (Eric Wong), 03/09/2014 02:22 AM

View differences:

test/ruby/test_module.rb
1065 1065
      (class << self ; self ; end).class_eval do
1066 1066
        define_method :method_added do |sym|
1067 1067
          memo << sym
1068
          memo << mod.instance_methods(false)
1068
          memo << mod.instance_methods(false).sort
1069 1069
          memo << (mod.instance_method(sym) rescue nil)
1070 1070
        end
1071 1071
      end
......
1082 1082
    assert_equal [:f, :g], memo.shift
1083 1083
    assert_equal mod.instance_method(:f), memo.shift
1084 1084
    assert_equal :a, memo.shift
1085
    assert_equal [:f, :g, :a], memo.shift
1085
    assert_equal [:a, :f, :g], memo.shift
1086 1086
    assert_equal mod.instance_method(:a), memo.shift
1087 1087
    assert_equal :a=, memo.shift
1088
    assert_equal [:f, :g, :a, :a=], memo.shift
1088
    assert_equal [:a, :a=, :f, :g], memo.shift
1089 1089
    assert_equal mod.instance_method(:a=), memo.shift
1090 1090
  end
1091 1091

  
test/ruby/test_struct.rb
141 141
    assert_equal("#<struct :@a=3>", o.inspect)
142 142

  
143 143
    methods = klass.instance_methods(false)
144
    assert_equal([:@a, :"@a="].inspect, methods.inspect, '[Bug #8756]')
144
    assert_equal([:@a, :"@a="].inspect, methods.sort.inspect, '[Bug #8756]')
145 145
    assert_include(methods, :@a)
146 146
    assert_include(methods, :"@a=")
147 147
  end
148
-