Sha256: 67cb471574db0b16ed2539a7bf3ffe3c8ff646ff3497f3ee73b7244739aec964

Contents?: true

Size: 355 Bytes

Versions: 19

Compression:

Stored size: 355 Bytes

Contents

# Little patch for Ruby 1.8 to give it BasicObject support
unless defined?(BasicObject)
 class BasicObject
    KEEP_METHODS = %w"__id__ __send__ instance_eval == equal? initialize"

    def self.remove_methods!
      m = (private_instance_methods + instance_methods) - KEEP_METHODS
      m.each{|m| undef_method(m)}
    end
    remove_methods!
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
migrant-1.5.0 lib/simple_object.rb
migrant-1.4.3 lib/simple_object.rb
migrant-1.4.1 lib/simple_object.rb
migrant-1.4.0 lib/simple_object.rb
migrant-1.3.2 lib/simple_object.rb
migrant-1.3.1 lib/simple_object.rb
migrant-1.3.0 lib/simple_object.rb
migrant-1.2.8 lib/simple_object.rb
migrant-1.2.7 lib/simple_object.rb
migrant-1.2.5 lib/simple_object.rb
migrant-1.2.2 lib/simple_object.rb
migrant-1.2.1 lib/simple_object.rb
migrant-1.2.0 lib/simple_object.rb
migrant-1.1.2 lib/simple_object.rb
migrant-1.1.1 lib/simple_object.rb
migrant-1.1.0 lib/simple_object.rb
migrant-1.0.2 lib/simple_object.rb
migrant-1.0.1 lib/simple_object.rb
migrant-1.0.0 lib/simple_object.rb