Bug #7667

Should Refinements be enabled by default?

Added by Shugo Maeda over 1 year ago. Updated over 1 year ago.

[ruby-core:51286]
Status:Closed
Priority:Normal
Assignee:Shugo Maeda
Category:-
Target version:-
ruby -v:ruby 2.0.0dev (2013-01-07 trunk 38719) [i686-linux] Backport:

Description

Currently, `require "refinement"' is needed to use Refinements, but I've heard from Matz that he wants Refinements to be enabled by default.
Is it right, Matz?

If so, I'm worried that other implementors might not want to enable Refinements by default, because it's an experimental feature.

Associated revisions

Revision 38729
Added by Shugo Maeda over 1 year ago

  • eval.c (Init_eval): enable Refinements by default.
    [Bug #7667]

  • eval.c (rbmodrefine, top_using): show a warning when
    Module#refine or main.using is called at the first time.

  • ext/refinement/*: removed the extension library "refinement".

  • test/ruby/test_refinement.rb: fix for the above changes.

History

#1 Updated by Yukihiro Matsumoto over 1 year ago

  • Assignee changed from Yukihiro Matsumoto to Shugo Maeda

Correct. I think we don't have to worry about other implementations if it's marked as EXPERIMENTAL in the NEWS file.

Matz.

#2 Updated by Shugo Maeda over 1 year ago

matz (Yukihiro Matsumoto) wrote:

Correct. I think we don't have to worry about other implementations if it's marked as EXPERIMENTAL in the NEWS file.

I think a warning should be shown when Module#refine or main.using is called at the first time.

#3 Updated by Shugo Maeda over 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r38729.
Shugo, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • eval.c (Init_eval): enable Refinements by default.
    [Bug #7667]

  • eval.c (rbmodrefine, top_using): show a warning when
    Module#refine or main.using is called at the first time.

  • ext/refinement/*: removed the extension library "refinement".

  • test/ruby/test_refinement.rb: fix for the above changes.

Also available in: Atom PDF