General

Profile

danielpclark (Daniel P. Clark)

Issues

Activity

05/27/2017

12:23 AM Ruby trunk Feature #13601: Remove yield_self from Ruby 2.5 (already implemented)
You both have provided better examples as to the differences. Also finding out `yield_self` returns an Enumerator wa...

05/26/2017

07:35 PM Ruby trunk Feature #13601 (Closed): Remove yield_self from Ruby 2.5 (already implemented)
Issue https://bugs.ruby-lang.org/issues/6721 for adding `yield_self` is unnecessary as `BasicObject#instance_eval` wi...

04/19/2016

10:02 AM Ruby trunk Feature #12281: Allow lexically scoped use of refinements with `using {}` block syntax
I found a way to use refinements in a block anywhere! Yay :-)
~~~ruby
module Moo
refine Fixnum do
def to...

04/14/2016

03:56 AM Ruby trunk Feature #12281: Allow lexically scoped use of refinements with `using {}` block syntax
I would also like the block for `using` to have access to local variables.
~~~ruby
def example(thing)
using My...
03:48 AM Ruby trunk Feature #12281 (Assigned): Allow lexically scoped use of refinements with `using {}` block syntax
In Ruby 2.2.3 a refinement could be used in a begin/end block.
~~~ruby
module Moo
refine Fixnum do
def to...
02:45 AM Ruby trunk Bug #11704: Refinements only get "used" once in loop
Tsuyoshi Sawada wrote:
> I had made a feature request #12079 (later than this post) to allow refinements to be effec...

04/13/2016

08:19 PM Ruby trunk Bug #11704: Refinements only get "used" once in loop
According to John (who commented on my blog on this issue) this is a Dynamic Dispatch issue. And the following examp...

02/10/2016

04:02 AM Ruby trunk Feature #12059: `Array#single?`, `Hash#single?`
Right. Given the original examples by the OP `Enumerable#one?` works.
~~~ruby
a = ["object1", "object2"]
"There...

02/09/2016

09:51 PM Ruby trunk Feature #12059: `Array#single?`, `Hash#single?`
Ruby currently supports the `one?` method on both Hash and Array.
~~~ruby
[1].one?
# => true
{a: 1}.one?
# =>...

02/04/2016

08:25 PM Ruby trunk Misc #12004: Code of Conduct
I'm genuinely sorry you're experiencing that Caroline and I pray no further unfriendly action occurs.
One thing to...

Also available in: Atom