[#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,
[#61847] Re: Plan Developers Meeting Japan April 2014
— Eric Wong <normalperson@...>
2014/04/03
Martin Boテ殕et <martin.bosslet@gmail.com> wrote:
[#61849] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/04
I will post summary of meeting on Google docs after the meeting.
[#61852] Re: Plan Developers Meeting Japan April 2014
— Eric Wong <normalperson@...>
2014/04/04
Zachary Scott <e@zzak.io> wrote:
[#61860] Re: Plan Developers Meeting Japan April 2014
— Zachary Scott <e@...>
2014/04/04
I=E2=80=99m ok with redmine, thanks for bringing up your concern!
[#62076] Candidacy to 2.1 branch maintainer. — Tomoyuki Chikanaga <nagachika00@...>
Hello,
7 messages
2014/04/17
[#62078] Re: Candidacy to 2.1 branch maintainer.
— SHIBATA Hiroshi <shibata.hiroshi@...>
2014/04/17
> And does anyone have counter proposal for 2.1 maintenance?
[ruby-core:62227] [ruby-trunk - Feature #9786] [Rejected] refinement & map(&:refinement_method) does not work
From:
nobu@...
Date:
2014-04-30 02:01:31 UTC
List:
ruby-core #62227
Issue #9786 has been updated by Nobuyoshi Nakada.
Description updated
Status changed from Open to Rejected
Refinements does affects to the current scope only.
And `Symbol#to_proc` is independent from the callers context.
A block works as you expect:
~~~ruby
puts a.map {|x| x.add_z}
~~~
----------------------------------------
Feature #9786: refinement & map(&:refinement_method) does not work
https://bugs.ruby-lang.org/issues/9786#change-46374
* Author: Daniel Lo
* Status: Rejected
* Priority: Low
* Assignee:
* Category:
* Target version:
----------------------------------------
Greetings!
Thank you for your hard work on ruby, I love the language.
I encountered an oddity, in which, I expected a refinement to be available and it wasn't.
Here is the sample code using: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
~~~
$ irb
irb(main):001:0> module MyRefinement
irb(main):002:1> refine Fixnum do
irb(main):003:2* def add_z
irb(main):004:3> self.to_s + 'z'
irb(main):005:3> end
irb(main):006:2> end
irb(main):007:1> end
=> #<refinement:Fixnum@MyRefinement>
irb(main):008:0>
irb(main):009:0*
irb(main):010:0* class Test
irb(main):011:1> using MyRefinement
irb(main):012:1>
irb(main):013:1* a = [ 1, 2 ]
irb(main):014:1> puts a.map(&:to_s)
irb(main):015:1> puts '-----'
irb(main):016:1> puts a.first.add_z
irb(main):017:1> puts '-----'
irb(main):018:1> puts a.map(&:add_z)
irb(main):019:1> end
1
2
-----
1z
-----
NoMethodError: super: no superclass method `add_z' for 1:Fixnum
from (irb):18:in `map'
from (irb):18:in `<class:Test>'
from (irb):10
from /usr/local/bin/irb:11:in `<main>'
irb(main):020:0>
~~~
Here is the code without the irb comments:
~~~ruby
module MyRefinement
refine Fixnum do
def add_z
self.to_s + 'z'
end
end
end
class Test
using MyRefinement
a = [ 1, 2 ]
puts a.map(&:to_s)
puts '-----'
puts a.first.add_z
puts '-----'
puts a.map(&:add_z)
end
~~~
Thank you!
-daniel
--
https://bugs.ruby-lang.org/