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

Changeset 4978

Show
Ignore:
Timestamp:
09/04/06 05:55:55 (2 years ago)
Author:
bitsweat
Message:

silenced writer

Files:

Legend:

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

    r4964 r4978  
    4646        @silenced = old_silenced 
    4747      end 
     48 
     49      attr_writer :silenced 
     50 
    4851 
    4952      private 
  • trunk/activesupport/test/deprecation_test.rb

    r4961 r4978  
    1010 
    1111  def partially(foo = nil) 
    12     ActiveSupport::Deprecation.warn 'calling with foo=nil is out' if foo.nil? 
     12    ActiveSupport::Deprecation.warn('calling with foo=nil is out', caller) if foo.nil? 
    1313  end 
    1414 
     
    8383      assert_not_deprecated { @dtc.partially } 
    8484    end 
     85 
     86    ActiveSupport::Deprecation.silenced = true 
     87    assert_not_deprecated { @dtc.partially } 
     88    ActiveSupport::Deprecation.silenced = false 
    8589  end 
    8690end