General

Profile

localhostdotdev (localhost .dev)

  • Login: localhostdotdev
  • Registered on: 03/08/2019
  • Last sign in: 05/06/2019

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 4 4

Activity

04/07/2019

08:24 PM Ruby Bug #15753 (Closed): unknown keyword when passing an hash to a method that accepts a default argument and a named argument
e.g.
```ruby
>> def a(b = {}, c: 1); p [b, c]; end; a(a: 1)
Traceback (most recent call last):
3: from (irb):3
2: from (irb):3:in `rescue in irb_binding'
1: from (irb):3:in `a'
ArgumentError (unknown keyw...
localhostdotdev (localhost .dev)

03/28/2019

11:54 AM Ruby Bug #15732: Strict mode
So, the main thing I was thinking about is passing blocks that then get silently ignored. I was thinking a good way to solve this would be to have a strict mode, and then I tried to come up with things that could be in a strict mode too.... localhostdotdev (localhost .dev)
11:44 AM Ruby Feature #15554: warn/error passing a block to a method which never use a block
To detect if a block is used, binding would also need to be detected, e.g.: `def b(arg); arg.eval("yield"); end; def a; b(binding); end` localhostdotdev (localhost .dev)

03/27/2019

10:24 PM Ruby Bug #15732 (Closed): Strict mode
A lot of issues could be easily prevented with a strict mode, for instance:
- Passing a block to a method that doesn't accept blocks could raise an exception, e.g. methods would be required to explicitly ask for a block (def a(..., &b...
localhostdotdev (localhost .dev)

03/22/2019

05:36 PM Ruby Bug #15712: DateTime#=== should be defined and compare date and time instead of just the date
@nobu Not sure why I wrote false (maybe I confused === with == in my testing), I'm getting `true` on ruby 2.5.3, 2.6.1, 2.6.2 and ruby-head (2.7.0 (same as the one registered in the issue)).
```
rvm ruby-head do ruby -e 'require "dat...
localhostdotdev (localhost .dev)

03/19/2019

05:00 PM Ruby Bug #15712 (Closed): DateTime#=== should be defined and compare date and time instead of just the date
DateTime#=== is inherited from Date#=== without overwriting the #=== method, this leads to DateTime#=== comparing only dates and ignore the time part.
```
DateTime.new(2001, 2, 3) === DateTime.new(2001, 2, 3, 12)
=> false
```
I ...
localhostdotdev (localhost .dev)

03/08/2019

11:06 PM Ruby Bug #15647 (Rejected): Disallow "in" as a keyword argument name
"`in`" is a reserved keyword and thus can't be accessed directly anyway.
e.g. the following is a syntax error:
```ruby
def m(in:); p in; end; m(in: 1)
```
And as usual, doing `in = 1` doesn't work.
"`in`" could still be pas...
localhostdotdev (localhost .dev)

Also available in: Atom