Hi,

2010/11/26 Yusuke ENDOH <mame / tsg.ne.jp>:
> Are these intended?
>
> (1)
>
> =A0class Foo
> =A0end
> =A0module FooExtCore
> =A0 =A0def foo
> =A0 =A0 =A0bar
> =A0 =A0end
> =A0 =A0def bar
> =A0 =A0end
> =A0end
> =A0module FooExt
> =A0 =A0refine(Foo) { include FooExtCore }
> =A0end
> =A0using(FooExt)
> =A0Foo.new.foo
> =A0 =A0#=3D> undefined local variable or method `bar'
>
> I can guess what's going on, but this will be a FAQ...

This behavior is intended, and you need define foo and bar inside the
block passed to refine.
I don't know any way to make the above code work without local rebinding.

> (2)
>
> =A0class Foo
> =A0end
> =A0module FooExt
> =A0end
> =A0using FooExt
> =A0module FooExt
> =A0 =A0refine(Foo) { include FooExt }
> =A0 =A0def foo
> =A0 =A0end
> =A0end
> =A0Foo.new.foo
> =A0 =A0#=3D> undefined method `foo'

I'd like to allow the above code if possible, but it's hard for me.

> Note that I don't want to attack this proposal.
> I'm really for this and I hope to help improve it.
> Please don't misunderstand me :-)

I know it.  Thanks for your helpful comments.

--=20
Shugo Maeda