Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Several named capture warnings in date/format #3865
JRuby 9k versions through 9.1.
Ideally none of the standard library sources should produce warnings in verbose mode.
Our date/format.rb, created by @eregon, produces the following errors when loaded in verbose mode:
These errors are Ruby's attempt to warn us that we're using the same local variable name as a named capture. I do not believe this warning is useful, and I have filed https://bugs.ruby-lang.org/issues/12359 to have it removed from Ruby. If that bug is not accepted, we'll need to change this code to eliminate the warnings.
One way to avoid it would be to put each branch in a different scope, either blocks or methods. But that probably has some overhead.