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

Changeset 6772

Show
Ignore:
Timestamp:
05/18/07 21:16:43 (1 year ago)
Author:
bitsweat
Message:

Silence some warnings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/lib/active_support/json/encoding.rb

    r6443 r6772  
    11require 'active_support/json/variable' 
    22 
    3 require 'active_support/json/encoders/object' # Require this file explicitly for rdoc 
    4 Dir[File.dirname(__FILE__) + '/encoders/**/*.rb'].each { |file| require file[0..-4] } 
     3require 'active_support/json/encoders/object' # Require explicitly for rdoc. 
     4Dir["#{File.dirname(__FILE__)}/encoders/**/*.rb"].each do |file| 
     5  basename = File.basename(file, '.rb') 
     6  unless basename == 'object' 
     7    require "active_support/json/encoders/#{basename}" 
     8  end 
     9end 
    510 
    611module ActiveSupport 
  • trunk/activesupport/test/test_test.rb

    r6701 r6772  
    5050  def test_expression_is_evaluated_in_the_appropriate_scope 
    5151    local_scope = 'foo' 
    52     assert_difference 'local_scope; @object.num' do 
    53       @object.increment 
     52    silence_warnings do 
     53      assert_difference('local_scope; @object.num') { @object.increment } 
    5454    end 
    5555  end