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)
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)
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)
@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)
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)
"`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)