Sha256: c59cadb586179b6a0512c47b50199cb21f407fffa27662a3fc94481cd787ad76

Contents?: true

Size: 629 Bytes

Versions: 5

Compression:

Stored size: 629 Bytes

Contents

require 'looksee/adapter/base'
require 'looksee/rbx'

module Looksee
  module Adapter
    class Rubinius < Base
      def internal_undefined_instance_methods(mod)
        return [] if !mod.origin.equal?(mod)
        names = []
        mod.method_table.entries.each do |(name, method, visibility)|
          names << name if visibility.equal?(:undef)
        end
        names
      end

      def singleton_instance(singleton_class)
        if Class === singleton_class && (instance = ::Rubinius::Type.singleton_class_object(singleton_class))
          instance
        else
          nil
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
looksee-4.4.0 lib/looksee/adapter/rubinius.rb
looksee-4.2.0 lib/looksee/adapter/rubinius.rb
looksee-4.1.0 lib/looksee/adapter/rubinius.rb
looksee-4.0.0-universal-java-1.8 lib/looksee/adapter/rubinius.rb
looksee-4.0.0 lib/looksee/adapter/rubinius.rb