Sha256: f2372514df67d84472ca02edb24849e35c3239d8fcb9af2fd83ceb48d9e863eb

Contents?: true

Size: 547 Bytes

Versions: 9

Compression:

Stored size: 547 Bytes

Contents

if defined? ::BasicObject
  # A class with no predefined methods that behaves similarly to Builder's
  # BlankSlate. Used for proxy classes.
  class BasicObject < ::BasicObject
    begin
      undef_method :==
      undef_method :equal?
    rescue
    end

    # Let ActiveSupport::BasicObject at least raise exceptions.
    def raise(*args)
      ::Object.send(:raise, *args)
    end
  end
else
  class BasicObject #:nodoc:
    instance_methods.each do |m|
      undef_method(m) if m.to_s !~ /(?:^__|^nil\?$|^send$|^object_id$)/
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
ruby_ext-0.4.11 lib/ruby_ext/basic_object.rb
ruby_ext-0.4.10 lib/ruby_ext/basic_object.rb
ruby_ext-0.4.9 lib/ruby_ext/basic_object.rb
ruby_ext-0.4.7 lib/ruby_ext/basic_object.rb
ruby_ext-0.4.6 lib/ruby_ext/basic_object.rb
ruby-ext-0.4.6 lib/ruby_ext/basic_object.rb
ruby-ext-0.4.4 lib/ruby_ext/basic_object.rb
ruby-ext-0.4.3 lib/ruby_ext/basic_object.rb
ruby-ext-0.4.2 lib/ruby_ext/basic_object.rb