Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8363

Show
Ignore:
Timestamp:
12/10/07 05:12:50 (2 years ago)
Author:
bitsweat
Message:

Ruby 1.9 compat. References #1689 [Pratik Naik]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/test/core_ext/class/delegating_attributes_test.rb

    r8056 r8363  
    2626    # should be no mutator 
    2727    assert single_class.respond_to?(:only_reader) 
    28     assert single_class.public_instance_methods.include?("only_reader") 
     28    assert single_class.public_instance_methods.map(&:to_s).include?("only_reader") 
    2929    assert !single_class.respond_to?(:only_reader=) 
    3030  end 
     
    4646    assert single_class.respond_to?(:both) 
    4747    assert single_class.respond_to?(:both=) 
    48     assert single_class.public_instance_methods.include?("both") 
    49     assert !single_class.public_instance_methods.include?("both=") 
     48    assert single_class.public_instance_methods.map(&:to_s).include?("both") 
     49    assert !single_class.public_instance_methods.map(&:to_s).include?("both=") 
    5050  end 
    5151 
  • trunk/activesupport/test/core_ext/enumerable_test.rb

    r7646 r8363  
    3838 
    3939  def test_nil_sums 
    40     expected_raise = RUBY_VERSION < '1.9.0' ? TypeError : NoMethodError 
     40    expected_raise = TypeError 
    4141 
    4242    assert_raise(expected_raise) { [5, 15, nil].sum } 
  • trunk/activesupport/test/ordered_options_test.rb

    r7657 r8363  
    55    @keys =   %w( blue   green  red    pink   orange ) 
    66    @values = %w( 000099 009900 aa0000 cc0066 cc6633 ) 
    7     @ordered_hash = ActiveSupport::OrderedHash.new(@keys.zip(@values).to_a) 
     7    @ordered_hash = ActiveSupport::OrderedHash.new 
     8 
     9    @keys.each_with_index do |key, index| 
     10      @ordered_hash[key] = @values[index] 
     11    end 
    812  end 
    913