Sha256: 901e357be26bceb5ec9169335d687e7e594185b29378cdebe37be393922ec771

Contents?: true

Size: 794 Bytes

Versions: 157

Compression:

Stored size: 794 Bytes

Contents

# A base class with no predefined methods that tries to behave like Builder's
# BlankSlate in Ruby 1.9. In Ruby pre-1.9, this is actually the
# Builder::BlankSlate class.
#
# Ruby 1.9 introduces BasicObject which differs slightly from Builder's
# BlankSlate that has been used so far. ActiveSupport::BasicObject provides a
# barebones base class that emulates Builder::BlankSlate while still relying on
# Ruby 1.9's BasicObject in Ruby 1.9.
module ActiveSupport
  if defined? ::BasicObject
    class BasicObject < ::BasicObject
      undef_method :==
      undef_method :equal?

      # Let ActiveSupport::BasicObject at least raise exceptions.
      def raise(*args)
        ::Object.send(:raise, *args)
      end
    end
  else
    require 'blankslate'
    BasicObject = BlankSlate
  end
end

Version data entries

157 entries across 124 versions & 19 rubygems

Version Path
depengine-0.0.14 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.13 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.13 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.12 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.12 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.11 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.11 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.10 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.10 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.9 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.9 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.8 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.8 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.7 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.7 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.5 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.5 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.4 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.4 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb
depengine-0.0.3 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/basic_object.rb