Sha256: 409523eb4d9df02f0b2d27e834f35236d4dd59d67ffe465b43973beac619b1cb

Contents?: true

Size: 157 Bytes

Versions: 6

Compression:

Stored size: 157 Bytes

Contents

if Module.method_defined? :singleton_class?
  class Module
    def singleton_class?
      # Hacky...
      inspect.start_with? '#<Class:#'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
backports-3.25.0 lib/backports/2.1.0/module/singleton_class.rb
backports-3.24.1 lib/backports/2.1.0/module/singleton_class.rb
backports-3.24.0 lib/backports/2.1.0/module/singleton_class.rb
backports-3.23.0 lib/backports/2.1.0/module/singleton_class.rb
backports-3.22.1 lib/backports/2.1.0/module/singleton_class.rb
backports-3.22.0 lib/backports/2.1.0/module/singleton_class.rb