General

Profile

david_macmahon (David MacMahon)

Issues

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

Activity

04/11/2016

06:52 AM Ruby Bug #11924: $ gem server is broken for documentation browsing
This is still happening for me with `ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]`. It seems to be caused by inconsistencies between URLs generated by darkfish and the RDoc::Servlet's expectations of which URLs are handled... david_macmahon (David MacMahon)

01/08/2015

04:42 AM Ruby Bug #10713: Assigning default value for a Hash as an empty Array creating unpredictable results
Arvinder Singh wrote:
> ~~~
> ...
The `letters[:a]` part of the second line returns the "default value" of the Hash because the `:a` key does not exist in the Hash. The `<< 1` part pushes a `1` onto the end of the default value, but i...
david_macmahon (David MacMahon)

12/05/2014

07:28 AM Ruby Feature #10570: Allow `+=` etc. to be methods
Yukihiro Matsumoto wrote:
> `Array#[]=` can be defined by alternation of elements of an array, which does not contain any assignment to variables. That's the reason that can be implemented by a method. In contrast, `a += b` includes ass...
david_macmahon (David MacMahon)
12:56 AM Ruby Feature #10570: Allow `+=` etc. to be methods
David MacMahon wrote:
> Yukihiro Matsumoto wrote:
> ...
...and the current behavior would be used for lvalues not implementing a `+=` method. That's the tricky part I was referring to in the original post.
Dave
david_macmahon (David MacMahon)
12:48 AM Ruby Feature #10570: Allow `+=` etc. to be methods
Thanks for your thoughtful reply!
Yukihiro Matsumoto wrote:
> `a+=b` is a short hand form of `a = a + b` by definition. It's fundamentally an assignment. Target of assignment (including += etc) is a variable, not an object. It cannot...
david_macmahon (David MacMahon)

12/04/2014

10:30 PM Ruby Feature #10570 (Rejected): Allow `+=` etc. to be methods
In MRI, it is currently possible to create `#+=` methods in C extensions and even `+=` aliases for existing methods in Ruby source code. These methods are only callable via `#send('+=', ...)` because the parser interprets `a += b` as `a... david_macmahon (David MacMahon)
05:11 PM Ruby Misc #10560: confusion between x=x+y, x+=y, x.concat(y) and y.each{|z| x<<z}
I imagine that Python also lets one override the `+=` method. I think this is impossible on Ruby because I think it is the parser that interprets `a += b` to be `a = a + b`, so only the `#+` method will be called (with coercion) regardl... david_macmahon (David MacMahon)

11/26/2014

07:14 PM Ruby Feature #10544: Time#to_i(:millisecond)
How about a more general `Time#to_i(scale=1)`?
Examples:
* Passing `1` for `scale` (or passing nothing) would return seconds.
* Passing `1000` for `scale` would return milliseconds.
* Passing `1/60r` for scale would return minute...
david_macmahon (David MacMahon)

10/13/2014

03:48 AM Ruby Feature #10225: [PATCH] *math.c: New method Math.normcdf
On Oct 11, 2014, at 11:18 PM, mail@tanakakazuki.com wrote:

> Sorry for my late. It's hard to say but.. ruby-gsl doesn't look good enough.

I agree that ruby-gsl has its shortcomings. GSL is a fairly large library that provides lot...
david_macmahon (David MacMahon)

09/17/2014

04:58 AM Ruby Feature #10077: [PATCH] Implement Matrix#row_merge and Matrix#column_merge
On Sep 16, 2014, at 4:21 PM, mail@tanakakazuki.com wrote:

> So I propose `horz_merge` and `vert_merge`. Dose it make sense?

I definitely like it better than `row_merge` and `col_merge`, but to me the verb "merge" has connotations ...
david_macmahon (David MacMahon)

Also available in: Atom