General

Profile

jneen (Jeanine Adkisson)

  • Login: jneen
  • Registered on: 03/06/2019
  • Last sign in: 02/21/2026

Issues

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

Activity

02/17/2026

08:27 PM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
This isn't even possible to work around by targeting RUBY_VERSION, as Ruby warns even in unreachable cases:
```ruby
regex = if RUBY_VERSION < '4'
/[\p{Word}\p{Cf}]/
else
/[\p{Word}]/
end
```
still warns on Ruby 4+, even t...
jneen (Jeanine Adkisson)

02/10/2026

03:32 PM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
Some benchmarks:
```console
$ ruby --version
ruby 4.0.1 (2026-01-13 revision e04267a14b) +PRISM [arm64-darwin25]
```
```ruby
require 'benchmark'
LENGTH = 1000000
REPEAT = 100
TEST_STR = 'a' * LENGTH
Benchmark.bm do |bm|
bm.report "...
jneen (Jeanine Adkisson)
01:15 PM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
That's a very interesting find!
I do think it makes sense to warn if an explicitly written character repeats in a character class, or if the class begins and ends with a colon. But for overlapping unicode properties, there doesn't see...
jneen (Jeanine Adkisson)

02/09/2026

05:42 PM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
trinistr (Alexander Bulancov) wrote in #note-11:
> > Using `/(\p{Word}|\p{S})/` is kind of a workaround, but it is slower.
> ...
This is what I actually tested. Still much slower.
mame (Yusuke Endoh) wrote in #note-9:
> jneen (Jeanine A...
jneen (Jeanine Adkisson)
05:54 AM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
That specific case also appears to have changed, e.g. on 3.4.1:
```ruby
[2] pry(main)> (0..0x10ffff).select{(s=[it].pack('U'); s=~/\p{Word}/&&s=~/\p{Cf}/) rescue false}.map{it.to_s 16}
=> []
```
Maybe for preset classes like `\p...
jneen (Jeanine Adkisson)
05:50 AM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
Another example of this is `/[\p{Word}\p{Cf}]/`, which seem to overlap precisely on ZWNJ (U+200C) and ZWJ (U+200D).
```ruby
[1] pry(main)> (0..0x10ffff).select{(s=[it].pack('U'); s=~/\p{Word}/&&s=~/\p{Cf}/) rescue false}.map{it.to_s ...
jneen (Jeanine Adkisson)
05:22 AM Ruby Feature #6478: BasicObject#__class__
I wonder if exposing a static `Object.class_of(thing)` would be appropriate? There's also the singleton_class to consider as well. jneen (Jeanine Adkisson)

02/08/2026

07:03 PM Ruby Bug #21870: Regexp: Warnings when using slightly overlapping \p{...} classes
I see! So they do have some overlap. Is it really correct to warn here though? "Fixing" the warning would require falling back to manual unicode ranges. jneen (Jeanine Adkisson)
06:41 AM Ruby Bug #21870 (Open): Regexp: Warnings when using slightly overlapping \p{...} classes
```ruby
$VERBOSE = true
# warning: character class has duplicated range: /[\p{Word}\p{S}]/
regex = /[\p{Word}\p{S}]/
```
As far as I can tell this is a perfectly valid and non-redundant set of unicode properties, but I am still be...
jneen (Jeanine Adkisson)

02/07/2026

06:37 AM Ruby Bug #21323: irb fails to start with Namespace
In fact, I believe this is still happening somewhat with IRB, in that the entire program seems to be run in the root box, and TOPLEVEL_BINDING changes are not visible:
```
$ ./bin/irb
irb(main):001> TOPLEVEL_BINDING.eval("A = 1")
=> 1
...
jneen (Jeanine Adkisson)

Also available in: Atom