General

Profile

jneen (Jeanine Adkisson)

  • Login: jneen
  • Registered on: 03/06/2019
  • Last sign in: 04/13/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 2 1 3

Activity

Today

05:22 PM Ruby Bug #21994: If there is a local variable `foo`, calls to a method `foo` with a regexp literal as first argument is always a SyntaxError without parentheses
> I think checking code validness is hard
I agree, since this check happens during lexical analysis, rather than parsing. It is a bit mind-boggling to me that lexical analysis depends on local variable scope, but it's what it is.
I ten...
jneen (Jeanine Adkisson)

04/13/2026

03:00 PM Ruby Bug #21994: If there is a local variable `foo`, calls to a method `foo` with a regexp literal as first argument is always a SyntaxError without parentheses
I should say that I think the *worst* solution to this would be to warn in both cases. It would effectively require us to rewrite our DSL across every rule for every language we support. My ideal world is one where we could go back to us... jneen (Jeanine Adkisson)
04:16 AM Ruby Bug #21994 (Open): If there is a local variable `foo`, calls to a method `foo` with a regexp literal as first argument is always a SyntaxError without parentheses
## Quick version:
```bash
ruby -e 'p /hello/' # => /hello/ (warning)
ruby -e 'p = 1; p /hello/' # syntax error
ruby -e 'p %r/hello/' # => /hello/ (no warning)
ruby -e 'p = 1; p %r/hello/' # syntax error
```
## Context
In Roug...
jneen (Jeanine Adkisson)
05:14 AM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
That was my expectation as well, but what I observed was that it does in fact seem to preserve warning behaviour for all of the other cases discussed here, as noted both here and in the pull request description. I would definitely feel s... jneen (Jeanine Adkisson)
04:30 AM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
As a point of order - I opened a pull request against Onigmo, should that have been to Ruby instead? I'm happy to do either or both. It is a fairly simple fix, but there are some tests in Ruby main that would need to change to reflect th... jneen (Jeanine Adkisson)

03/13/2026

04:35 PM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
I have submitted a patch to Onigmo with the naive strategy (A) as outlined above:
https://github.com/k-takata/Onigmo/pull/175
Contrary to my expectations, it does appear that `/[\p{Word}\p{Alpha}]/` and `/[a-fb-g]/` **do** continue...
jneen (Jeanine Adkisson)

03/10/2026

01:14 AM Ruby Misc #21877: DevMeeting-2026-03-17
* [Bug #21870] Regexp: Warnings when using slightly overlapping `\p{...}` classes (jneen)
* Warning spam on code that definitely isn't a mistake (`/[\p{Word}\p{S}]/` and other overlapping properties)
* Noted some possible ways forwar...
jneen (Jeanine Adkisson)

03/05/2026

04:03 AM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
If there are no objections, I'll submit a patch with strategy (a) next week. It's straightforward to implement and maintains the closest to the current behaviour as possible while fixing the issue. jneen (Jeanine Adkisson)

02/24/2026

05:52 AM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
A quick benchmark shows we are within error bars for matching performance:
```ruby
#!/usr/bin/env ruby
require 'benchmark'
NON_REPEAT = Regexp.new("[" + ("a-z" * 1) + "]")
YES_REPEAT = Regexp.new("[" + ("a-z" * 100000) + "]")
...
jneen (Jeanine Adkisson)
05:41 AM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
Having looked through the onigmo code a bit now, I can think of a few ways forward.
**a) Simply don't warn on overlapping ctype classes.**
I believe this would only involve removing the check on line 1860 from regparse.c. This woul...
jneen (Jeanine Adkisson)

Also available in: Atom