use correct variant of checking whether class is a singleton #4283

Merged
merged 1 commit into from Jan 3, 2012

2 participants

@lest
irb(main):008:0> klass = (class << Object.new; self end)
=> #<Class:#<Object:0x0000010084da68>>
irb(main):009:0> klass.ancestors.first == klass
=> false
irb(main):010:0> klass = Class.new
=> #<Class:0x000001010a5ff8>
irb(main):011:0> klass.ancestors.first == klass
=> true
@tenderlove tenderlove merged commit d1230a8 into rails:master Jan 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment