Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This looks like a bug in prism:
```
$ rbenv shell 3.4.0-rc1
$ ruby -e 'pp ([["foo"]] in [/\Afoo\b/i | [/\Afoo\z/i, *]])'
false
$ ruby --parser=parse.y -e 'pp ([["foo"]] in [/\Afoo\b/i | [/\Afoo\z/i, *]])'
true
```
  • Loading branch information
nevans committed Dec 15, 2024
1 parent 7d62229 commit 35ab834
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3248,6 +3248,10 @@ def search_args(keys, charset_arg = nil, return: nil, charset: nil)
esearch = false
in [_, Array[RETURN_WHOLE, _, *] | RETURN_START]
raise ArgumentError, "conflicting return options"
in [_, Array[RETURN_WHOLE, _, *]] # workaround for https://bugs.ruby-lang.org/issues/20956
raise ArgumentError, "conflicting return options"
in [_, RETURN_START] # workaround for https://bugs.ruby-lang.org/issues/20956
raise ArgumentError, "conflicting return options"
in [return_opts, keys]
return_opts = convert_return_opts(return_opts)
esearch = true
Expand Down

0 comments on commit 35ab834

Please sign in to comment.