diff options
author | Lars Kanis <[email protected]> | 2020-01-17 19:30:28 +0100 |
---|---|---|
committer | aycabta <[email protected]> | 2020-01-20 19:13:19 +0900 |
commit | f451bb5406878e1ac9ce9d37952f171837d0cb09 (patch) | |
tree | c6ee274410b2f930cc85bd119daf0e699e8b987d /lib/racc/grammarfileparser.rb | |
parent | 3b407abe9b8da640dc07617d3dacac0057ca597f (diff) |
[ruby/irb] Fix compatibility with rails before 5.2
Rails before 5.2 added Array#append as an alias to Array#<< ,
so that it expects only one argument.
However ruby-2.5 added Array#append as an alias to Array#push
which takes any number of arguments.
If irb completion is used in `rails c` (for example "IO.<tab>")
it fails with:
irb/completion.rb:206:in `<<': wrong number of arguments (given 3, expected 1) (ArgumentError)
Using Array#push instead of Array#append fixes compatibility.
https://github.com/ruby/irb/commit/5b7bbf9c34
Diffstat (limited to 'lib/racc/grammarfileparser.rb')
0 files changed, 0 insertions, 0 deletions