--mimepart_4ced0f35a1beb_36e613a17cc47860
Content-Type: text/plain
Content-Transfer-Encoding: Quoted-printable
Content-Disposition: inline

Feature #4085: Refinements and nested methods
http://redmine.ruby-lang.org/issues/show/4085

Author: Shugo Maeda
Status: Open, Priority: Normal
Category: core, Target version: 1.9.3

As I said at RubyConf 2010, I'd like to propose a new features called
"Refinements."

Refinements are similar to Classboxes.  However, Refinements doesn't
support local rebinding as mentioned later.  In this sense,
Refinements might be more similar to selector namespaces, but I'm not
sure because I have never seen any implementation of selector
namespaces.

In Refinements, a Ruby module is used as a namespace (or classbox) for
class extensions.  Such class extensions are called refinements.  For
example, the following module refines Fixnum.

  module MathN
    refine Fixnum do
      def /(other) quo(other) end
    end
  end

Module#refine(klass) takes one argument, which is a class to be
extended.  Module#refine also takes a block, where additional or
overriding methods of klass can be defined.  In this example, MathN
refines Fixnum so that 1 / 2 returns a rational number (1/2) instead
of an integer 0.

This refinement can be enabled by the method using.

  class Foo
    using MathN

    def foo
      p 1 / 2
    end
  end

  f = Foo.new
  f.foo #=> (1/2)
  p 1 / 2

In this example, the refinement in MathN is enabled in the definition
of Foo.  The effective scope of the refinement is the innermost class,
module, or method where using is called; however the refinement is not
enabled before the call of using.  If there is no such class, module,
or method, then the effective scope is the file where using is called.
Note that refinements are pseudo-lexically scoped.  For example,
foo.baz prints not "FooExt#bar" but "Foo#bar" in the following code:

  class Foo
    def bar
      puts "Foo#bar"
    end

    def baz
      bar
    end
  end

  module FooExt
    refine Foo do
      def bar
        puts "FooExt#bar"
      end
    end
  end

  module Quux
    using FooExt

    foo = Foo.new
    foo.bar  # => FooExt#bar
    foo.baz  # => Foo#bar
  end

Refinements are also enabled in reopened definitions of classes using
refinements and definitions of their subclasses, so they are
*pseudo*-lexically scoped.

  class Foo
    using MathN
  end

  class Foo
    # MathN is enabled in a reopened definition.
    p 1 / 2  #=> (1/2)
  end

  class Bar < Foo
    # MathN is enabled in a subclass definition.
    p 1 / 2  #=> (1/2)
  end

If a module or class is using refinements, they are enabled in
module_eval, class_eval, and instance_eval if the receiver is the
class or module, or an instance of the class.

  module A
    using MathN
  end
  class B
    using MathN
  end
  MathN.module_eval do
    p 1 / 2  #=> (1/2)
  end
  A.module_eval do
    p 1 / 2  #=> (1/2)
  end
  B.class_eval do
    p 1 / 2  #=> (1/2)
  end
  B.new.instance_eval do
    p 1 / 2  #=> (1/2)
  end

Besides refinements, I'd like to propose new behavior of nested methods.
Currently, the scope of a nested method is not closed in the outer method.

  def foo
    def bar
      puts "bar"
    end
    bar
  end
  foo  #=> bar
  bar  #=> bar

In Ruby, there are no functions, but only methods.  So there are no
right places where nested methods are defined.  However, if
refinements are introduced, a refinement enabled only in the outer
method would be the right place.  For example, the above code is
almost equivalent to the following code:

  def foo
    klass = self.class
    m = Module.new {
      refine klass do
        def bar
          puts "bar"
        end
      end
    }
    using m
    bar
  end
  foo  #=> bar
  bar  #=> NoMethodError

The attached patch is based on SVN trunk r29837.


----------------------------------------
http://redmine.ruby-lang.org

--mimepart_4ced0f35a1beb_36e613a17cc47860
Content-Type: text/x-patch; name=refinement-r29837-20101124.diff
Content-Transfer-Encoding: Base64
Content-Disposition: attachment; filename=refinement-r29837-20101124.diff

ZGlmZiAtLWdpdCBhL2Jvb3RzdHJhcHRlc3QvdGVzdF9tZXRob2QucmIgYi9i
b290c3RyYXB0ZXN0L3Rlc3RfbWV0aG9kLnJiCmluZGV4IDhkMGRiNmUuLmM2
YzNiMDkgMTAwNjQ0Ci0tLSBhL2Jvb3RzdHJhcHRlc3QvdGVzdF9tZXRob2Qu
cmIKKysrIGIvYm9vdHN0cmFwdGVzdC90ZXN0X21ldGhvZC5yYgpAQCAtMjg3
LDE2ICsyODcsMTcgQEAgYXNzZXJ0X2VxdWFsICcxJywgICAgICAgJXEoIGNs
YXNzIEM7IGRlZiBtKCkgMSBlbmQgZW5kCiBhc3NlcnRfZXF1YWwgJzEnLCAg
ICAgICAlcSggY2xhc3MgQwogICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgZGVmIG0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVm
IG1tKCkgMSBlbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
bW0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZAogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIGVuZAotICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIEMubmV3Lm0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBDLm5ldy5tbSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQy5u
ZXcubSApCiBhc3NlcnRfZXF1YWwgJzEnLCAgICAgICAlcSggY2xhc3MgQwog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmIG0KICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgZGVmIG1tKCkgMSBlbmQKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgbW0KICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIGVuZAogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIGVuZAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluc3RhbmNl
X2V2YWwgIkMubmV3Lm07IEMubmV3Lm1tIiApCisgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgaW5zdGFuY2VfZXZhbCAiQy5uZXcubSIgKQogCiAjIG1l
dGhvZF9taXNzaW5nCiBhc3NlcnRfZXF1YWwgJzptJywgICAgICAlcSggY2xh
c3MgQwpkaWZmIC0tZ2l0IGEvY2xhc3MuYyBiL2NsYXNzLmMKaW5kZXggMjI0
MTc5Mi4uNWM3ODM1YiAxMDA2NDQKLS0tIGEvY2xhc3MuYworKysgYi9jbGFz
cy5jCkBAIC02MTcsOCArNjE3LDggQEAgcmJfZGVmaW5lX21vZHVsZV9pZF91
bmRlcihWQUxVRSBvdXRlciwgSUQgaWQpCiAgICAgcmV0dXJuIG1vZHVsZTsK
IH0KIAotc3RhdGljIFZBTFVFCi1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5yYgpAQCAtMCwwICsxLDIxMCBAQAorcmVxdWlyZSAndGVzdC91
bml0JworCitjbGFzcyBUZXN0UmVmaW5lbWVudCA8IFRlc3Q6OlVuaXQ6OlRl
c3RDYXNlCisgIGNsYXNzIEZvbworICAgIGRlZiB4CisgICAgICByZXR1cm4g
IkZvbyN4IgorICAgIGVuZAorCisgICAgZGVmIHkKKyAgICAgIHJldHVybiAi
Rm9vI3kiCisgICAgZW5kCisKKyAgICBkZWYgY2FsbF94CisgICAgICByZXR1
cm4geAorICAgIGVuZAorICBlbmQKKworICBtb2R1bGUgRm9vRXh0CisgICAg
cmVmaW5lIEZvbyBkbworICAgICAgZGVmIHgKKyAgICAgICAgcmV0dXJuICJG
b29FeHQjeCIKKyAgICAgIGVuZAorCisgICAgICBkZWYgeQorICAgICAgICBy
ZXR1cm4gIkZvb0V4dCN5ICIgKyBzdXBlcgorICAgICAgZW5kCisKKyAgICAg
IGRlZiB6CisgICAgICAgIHJldHVybiAiRm9vRXh0I3oiCisgICAgICBlbmQK
KyAgICBlbmQKKyAgZW5kCisKKyAgbW9kdWxlIEZvb0V4dDIKKyAgICByZWZp
bmUgRm9vIGRvCisgICAgICBkZWYgeAorICAgICAgICByZXR1cm4gIkZvb0V4
dDIjeCIKKyAgICAgIGVuZAorCisgICAgICBkZWYgeQorICAgICAgICByZXR1
cm4gIkZvb0V4dDIjeSAiICsgc3VwZXIKKyAgICAgIGVuZAorCisgICAgICBk
ZWYgegorICAgICAgICByZXR1cm4gIkZvb0V4dDIjeiIKKyAgICAgIGVuZAor
ICAgIGVuZAorICBlbmQKKworICBjbGFzcyBGb29TdWIgPCBGb28KKyAgICBk
ZWYgeAorICAgICAgcmV0dXJuICJGb29TdWIjeCIKKyAgICBlbmQKKworICAg
IGRlZiB5CisgICAgICByZXR1cm4gIkZvb1N1YiN5ICIgKyBzdXBlcgorICAg
IGVuZAorICBlbmQKKworICBjbGFzcyBGb29FeHRDbGllbnQKKyAgICB1c2lu
ZyBGb29FeHQKKworICAgIGRlZiBzZWxmLmludm9rZV94X29uKGZvbykKKyAg
ICAgIHJldHVybiBmb28ueAorICAgIGVuZAorCisgICAgZGVmIHNlbGYuaW52
b2tlX3lfb24oZm9vKQorICAgICAgcmV0dXJuIGZvby55CisgICAgZW5kCisK
KyAgICBkZWYgc2VsZi5pbnZva2Vfel9vbihmb28pCisgICAgICByZXR1cm4g
Zm9vLnoKKyAgICBlbmQKKworICAgIGRlZiBzZWxmLmludm9rZV9jYWxsX3hf
b24oZm9vKQorICAgICAgcmV0dXJuIGZvby5jYWxsX3gKKyAgICBlbmQKKyAg
ZW5kCisKKyAgY2xhc3MgRm9vRXh0Q2xpZW50MgorICAgIHVzaW5nIEZvb0V4
dAorICAgIHVzaW5nIEZvb0V4dDIKKworICAgIGRlZiBzZWxmLmludm9rZV95
X29uKGZvbykKKyAgICAgIHJldHVybiBmb28ueQorICAgIGVuZAorICBlbmQK
KworICBkZWYgdGVzdF9vdmVycmlkZQorICAgIGZvbyA9IEZvby5uZXcKKyAg
ICBhc3NlcnRfZXF1YWwoIkZvbyN4IiwgZm9vLngpCisgICAgYXNzZXJ0X2Vx
dWFsKCJGb29FeHQjeCIsIEZvb0V4dENsaWVudC5pbnZva2VfeF9vbihmb28p
KQorICAgIGFzc2VydF9lcXVhbCgiRm9vI3giLCBmb28ueCkKKyAgZW5kCisK
KyAgZGVmIHRlc3Rfc3VwZXIKKyAgICBmb28gPSBGb28ubmV3CisgICAgYXNz
ZXJ0X2VxdWFsKCJGb28jeSIsIGZvby55KQorICAgIGFzc2VydF9lcXVhbCgi
Rm9vRXh0I3kgRm9vI3kiLCBGb29FeHRDbGllbnQuaW52b2tlX3lfb24oZm9v
KSkKKyAgICBhc3NlcnRfZXF1YWwoIkZvbyN5IiwgZm9vLnkpCisgIGVuZAor
CisgIGRlZiB0ZXN0X3N1cGVyX2NoYWluCisgICAgZm9vID0gRm9vLm5ldwor
ICAgIGFzc2VydF9lcXVhbCgiRm9vI3kiLCBmb28ueS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