Using #include at the instance level?

F

fkocherga

=20interpreter complains about uninitialized constant N. What is the big =
reason for dynamically defined class to behave so differently? It would =
be very non obvious and unexpected behavior. Actually both cases work as =
expected in Ruby 1.9.1 and this is correct behavior according to the =
Ruby Draft.
=20
Nice clarification.
=20
Are there two issues here? This issue and the resolution of constants
via instance_eval? Or are these two aspects of the same issue?
I believe they are aspects of the same issue.
In either case, there is no doubt in my mind that 'class B' and 'B =3D
Class.new do' should work the same.
I agree, but if constant lookup rules are going to be reverted to 1.8 I =
doubt that both forms will behave the same.=20
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top