A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://bugs.ruby-lang.org/issues/19714 below:

Feature #19714: Add Refinement#refined_module - Ruby

Feature #19714closed

Add Refinement#refined_module

Description

Eregon (Benoit Daloze) wrote in https://bugs.ruby-lang.org/issues/12737#note-15:

Refinement#refined_class is a bit strange given it can return a module.
How about adding Refinement#refined_module as an alias for clarity?

I'm for it. What do you think, Matz?

I am not 100% satisfied. Probably (unlike class_eval and module_eval whose class/module distinction is for the receiver), the method returns a class or a module, unrelated to the name.
Is there any idea?

Matz.

matz (Yukihiro Matsumoto) wrote in #note-2:

I am not 100% satisfied. Probably (unlike class_eval and module_eval whose class/module distinction is for the receiver), the method returns a class or a module, unrelated to the name.
Is there any idea?

The first one I came up with is #refined_subject in the same sense as #subject in RSpec: http://rspec.info/features/3-12/rspec-core/subject/explicit-subject/

Among those proposed names, target and subject are acceptable. I am not sure refined_ prefix required or not, as not being English native.
Maybe should we admit the design mistake and make refined_class obsolete?

Matz.

matz (Yukihiro Matsumoto) wrote in #note-4:

Among those proposed names, target and subject are acceptable. I am not sure refined_ prefix required or not, as not being English native.
Maybe should we admit the design mistake and make refined_class obsolete?

I prefer target and agree to making refined_class obsolete.

Make obsolete = deprecate it, right? (sounds OK)

Refinement#target sounds good to me.

Also available in: Atom PDF

Like0

Like0 Like0 Like0 Like0 Like0 Like0 Like0 Like0 Like0 Like0

Loading...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3