7stud -- wrote in post #998328:
>
> Also:
>
> puts RUBY_VERSION
>
> x = class A
> end
>
> p x
>
> x  = class <<self
> end
>
> p x
>
> --output:--
> 1.9.2
> nil
> nil
>
>
> p x.instance_methods
>
> prog.rb:11:in `<main>': undefined method `instance_methods' for
> nil:NilClass (NoMethodError)


And...

puts RUBY_VERSION  #=>1.8.6

x = class A
end

p x    #=>nil

x  = class <<self
end

p x    #=>nil

p x.instance_methods  #error

-- 
Posted via http://www.ruby-forum.com/.