[#61822] Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...>

I would like to request developers meeting around April 17 or 18 in this mo=

14 messages 2014/04/03
[#61825] Re: Plan Developers Meeting Japan April 2014 — Urabe Shyouhei <shyouhei@...> 2014/04/03

It's good if we have a meeting then.

[#61826] Re: Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...> 2014/04/03

Regarding openssl issues, I=E2=80=99ve discussed possible meeting time with=

[#61833] Re: Plan Developers Meeting Japan April 2014 — Martin Bo煬et <martin.bosslet@...> 2014/04/03

Hi,

[ruby-core:61881] [ruby-trunk - Feature #9704] Refinements as files instead of modules

From: matz@...
Date: 2014-04-06 12:07:06 UTC
List: ruby-core #61881
Issue #9704 has been updated by Yukihiro Matsumoto.


So your key idea is sharing implementation between monkey-patching and refinements.
The motivation behind introducing refinements is discouraging monkey-patching. So it is not attractive for me to something that helps monkey-patching.

What is your intention behind the proposal?  Maybe from monkey-patching to refinements transition?

Matz.


----------------------------------------
Feature #9704: Refinements as files instead of modules
https://bugs.ruby-lang.org/issues/9704#change-46093

* Author: Thomas Sawyer
* Status: Open
* Priority: Normal
* Assignee: 
* Category: core
* Target version: Next Major
----------------------------------------
If refinements are to remain file-scoped, then it would be more convenient if `using` worked at the file level, akin to `require`, rather than behave like a module `include`. For instance, instead of:

~~~
# foo.rb
module Foo
  refine String do
    def some_method
      ...
    end
  end
end
~~~

~~~
require 'foo'
using Foo
~~~

We could do:

~~~
# foo.rb
class String
  def some_method
    ...
  end
end
~~~

~~~
using 'foo'
~~~

This would make `require` and `using`, in a certain sense, *polymorphic* --if we `require` it will extend the classes directly, but if `using` then they will be refined instead.




-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next