Sha256: 5727ccc41b34deb0b82505967cc4359fac7ec35fe8d61af5dfae9092290243dc

Contents?: true

Size: 793 Bytes

Versions: 25

Compression:

Stored size: 793 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 RUBY_VERSION >= '1.9'
    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

25 entries across 25 versions & 7 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/basic_object.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/basic_object.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/basic_object.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/basic_object.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/basic_object.rb
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/basic_object.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/basic_object.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/basic_object.rb
activesupport-2.1.1 lib/active_support/basic_object.rb
activesupport-2.1.2 lib/active_support/basic_object.rb