From: "zenspider (Ryan Davis) via ruby-core" Date: 2025-04-28T20:15:27+00:00 Subject: [ruby-core:121757] [Ruby Bug#21291] possible bug with /m regexp and $ based on input Issue #21291 has been reported by zenspider (Ryan Davis). ---------------------------------------- Bug #21291: possible bug with /m regexp and $ based on input https://bugs.ruby-lang.org/issues/21291 * Author: zenspider (Ryan Davis) * Status: Open * ruby -v: 3.4.2 * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- reported in discord by the.unnamed user: ``` ruby #!/usr/bin/env -S ruby -vw # => ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [arm64-darwin24] p "a\n" =~ /$./m # => 1 p "a\n" =~ /$.*/m # => 1 p "aa\n" =~ /$./m # => 2 p "aa\n" =~ /$.*/m # !!! # => nil p "aa\n" =~ /$[\S\s]*/m # => 2 ``` goes back to at least 3.2.8 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/