General

Profile

recursive-madman (Recursive Madman)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 1 2

Activity

02/22/2016

04:41 PM Ruby Bug #12100: CSV converters fail when using single arg proc
I'm pretty sure this will introduce new bugs.
The meaning of an arity of -1 is "any number of arguments".
In reality you're not passing a proc which takes 1 argument (which would
work w/o your patch), but a proc which takes any numb...
recursive-madman (Recursive Madman)

04/27/2015

11:47 PM Ruby Bug #11103: Reassignment in if block that is not ran, causes variable to become nil
Ruby is behaving as it should here. Your confusion is between local variables and method calls.
Before that 'if' block `mock_input` resolves to the "mock_input" *method* of your class. The 'if' block then declares a variable with the sa...
recursive-madman (Recursive Madman)

04/08/2015

11:31 AM Ruby Feature #11049: Enumerable#grep_v (inversed grep)
Benoit Daloze wrote:
> That only works for some regexps, I doubt there is a proper and well defined inverted regexp for any Regexp.
Could you provide an example that doesn't work?
recursive-madman (Recursive Madman)
11:18 AM Ruby Feature #11049: Enumerable#grep_v (inversed grep)
How about implementing `Regexp#invert` instead?
```ruby
/b/.invert #=> /[^(?:b)]/
```
Like this for example:
```ruby
class Regexp
def invert
self.class.new("[^(?:#{source})]")
end
end
%w(aaa bbb ccc).grep(/b/...
recursive-madman (Recursive Madman)

04/05/2015

08:40 AM Ruby Feature #11034: Nil Conditional
This is similar to a pattern I have seen somewhere else:
```ruby
var = 123.4
var.try.round #=> 123
var = nil
var.try.round #=> nil
```
Which doesn't introduce a new operator and can be implemented like this:
```ruby
class ...
recursive-madman (Recursive Madman)

03/04/2015

09:04 PM Ruby Feature #10930: Allow splat operator to work for string interpolation
Matthew Kerwin wrote:
>
> ...
It doesn't actually:
```ruby
2.2.0 :001 > puts %w(a b c).to_s
["a", "b", "c"]
```
`join` joins without a comma:
```ruby
2.2.0 :002 > puts %w(a b c).join
abc
```
Also, I agree with your ...
recursive-madman (Recursive Madman)

02/23/2015

04:08 PM Ruby Feature #10883: Passing a block to itself
Note that for your example that wouldn't be needed:
```
a = an_array.foo.bar
a[1..a.length-1].baz
```
is equivalent to
```
an_array.foo.bar[1..-1].baz
```
recursive-madman (Recursive Madman)

02/19/2015

08:25 PM Ruby Feature #10849: Adding an alphanumeric function to SecureRandom
Suggestion: Rename `graph` to `printable` and possibly add an `:allow_space` option?
recursive-madman (Recursive Madman)

01/02/2015

06:00 AM Ruby Feature #10683: fix inconsistent behavior of Kernel.Hash()
> I don't think either of your proposed options will be accepted.
I can see that making `Hash(obj)` equivalent to `obj.to_h` would be a major change in functionality.
The primary reasons for opening up this issue are two points:
*...
recursive-madman (Recursive Madman)

12/31/2014

07:35 PM Ruby Feature #10683 (Open): fix inconsistent behavior of Kernel.Hash()
I find the way the global function `Hash` (aka `Kernel.Hash`) works a bit confusing.
To illustrate:
```ruby
Hash(nil) #=> {} (1)
Hash({}) #=> {} (2)
Hash([]) #=> {} (3)
# but
Hash([[1,2]]) #! TypeError (4)
```
Case (1...
recursive-madman (Recursive Madman)

Also available in: Atom