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)
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)
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)
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. Davedavid_macmahon (David MacMahon)
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)
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)
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)
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)