* [ruby-core:55671] [CommonRuby - Feature #8571][Assigned] Refinement inheritance by Module#include
@ 2013-06-27 9:19 shugo (Shugo Maeda)
2013-06-30 22:10 ` [ruby-core:55721] [CommonRuby - Feature #8571] " matz (Yukihiro Matsumoto)
2013-07-01 4:29 ` [ruby-core:55725] [CommonRuby - Feature #8571][Closed] " shugo (Shugo Maeda)
0 siblings, 2 replies; 3+ messages in thread
From: shugo (Shugo Maeda) @ 2013-06-27 9:19 UTC (permalink / raw
To: ruby-core
Issue #8571 has been reported by shugo (Shugo Maeda).
----------------------------------------
Feature #8571: Refinement inheritance by Module#include
https://bugs.ruby-lang.org/issues/8571
Author: shugo (Shugo Maeda)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category:
Target version:
Currently, refinements are not inherited by Module#include.
How about to make using to activate refinements in the ancestors of the specified module?
For example,
module A
refine X do ... end
refine Y do ... end
end
module B
refine Z do ... end
end
module C
include A
include B
end
using C
# Refinements in A and B are activated here.
In this code,
using C
is equivalent to
C.ancestors.reverse_each { |m| using m }
This feature enables you to distribute refinements into different modules, and then package the refinements into one module.
Please note that Module#include does't activate refinements in the argument module.
For example,
module C
include A
include B
# Refinements in A and B are not activated here.
end
I've implemented this feature, and have attached the patch.
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:55721] [CommonRuby - Feature #8571] Refinement inheritance by Module#include
2013-06-27 9:19 [ruby-core:55671] [CommonRuby - Feature #8571][Assigned] Refinement inheritance by Module#include shugo (Shugo Maeda)
@ 2013-06-30 22:10 ` matz (Yukihiro Matsumoto)
2013-07-01 4:29 ` [ruby-core:55725] [CommonRuby - Feature #8571][Closed] " shugo (Shugo Maeda)
1 sibling, 0 replies; 3+ messages in thread
From: matz (Yukihiro Matsumoto) @ 2013-06-30 22:10 UTC (permalink / raw
To: ruby-core
Issue #8571 has been updated by matz (Yukihiro Matsumoto).
Assignee changed from matz (Yukihiro Matsumoto) to shugo (Shugo Maeda)
Agreed. It also conforms the original design.
Matz.
----------------------------------------
Feature #8571: Refinement inheritance by Module#include
https://bugs.ruby-lang.org/issues/8571#change-40215
Author: shugo (Shugo Maeda)
Status: Assigned
Priority: Normal
Assignee: shugo (Shugo Maeda)
Category:
Target version:
Currently, refinements are not inherited by Module#include.
How about to make using to activate refinements in the ancestors of the specified module?
For example,
module A
refine X do ... end
refine Y do ... end
end
module B
refine Z do ... end
end
module C
include A
include B
end
using C
# Refinements in A and B are activated here.
In this code,
using C
is equivalent to
C.ancestors.reverse_each { |m| using m }
This feature enables you to distribute refinements into different modules, and then package the refinements into one module.
Please note that Module#include does't activate refinements in the argument module.
For example,
module C
include A
include B
# Refinements in A and B are not activated here.
end
I've implemented this feature, and have attached the patch.
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:55725] [CommonRuby - Feature #8571][Closed] Refinement inheritance by Module#include
2013-06-27 9:19 [ruby-core:55671] [CommonRuby - Feature #8571][Assigned] Refinement inheritance by Module#include shugo (Shugo Maeda)
2013-06-30 22:10 ` [ruby-core:55721] [CommonRuby - Feature #8571] " matz (Yukihiro Matsumoto)
@ 2013-07-01 4:29 ` shugo (Shugo Maeda)
1 sibling, 0 replies; 3+ messages in thread
From: shugo (Shugo Maeda) @ 2013-07-01 4:29 UTC (permalink / raw
To: ruby-core
Issue #8571 has been updated by shugo (Shugo Maeda).
Status changed from Assigned to Closed
matz (Yukihiro Matsumoto) wrote:
> Agreed. It also conforms the original design.
I've committed in r41719. Thanks.
----------------------------------------
Feature #8571: Refinement inheritance by Module#include
https://bugs.ruby-lang.org/issues/8571#change-40220
Author: shugo (Shugo Maeda)
Status: Closed
Priority: Normal
Assignee: shugo (Shugo Maeda)
Category:
Target version:
Currently, refinements are not inherited by Module#include.
How about to make using to activate refinements in the ancestors of the specified module?
For example,
module A
refine X do ... end
refine Y do ... end
end
module B
refine Z do ... end
end
module C
include A
include B
end
using C
# Refinements in A and B are activated here.
In this code,
using C
is equivalent to
C.ancestors.reverse_each { |m| using m }
This feature enables you to distribute refinements into different modules, and then package the refinements into one module.
Please note that Module#include does't activate refinements in the argument module.
For example,
module C
include A
include B
# Refinements in A and B are not activated here.
end
I've implemented this feature, and have attached the patch.
--
http://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-01 4:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 9:19 [ruby-core:55671] [CommonRuby - Feature #8571][Assigned] Refinement inheritance by Module#include shugo (Shugo Maeda)
2013-06-30 22:10 ` [ruby-core:55721] [CommonRuby - Feature #8571] " matz (Yukihiro Matsumoto)
2013-07-01 4:29 ` [ruby-core:55725] [CommonRuby - Feature #8571][Closed] " shugo (Shugo Maeda)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).