backreferencing with named groups in gsub broken #2126

andreaseger opened this Issue Jan 15, 2013 · 1 comment


None yet
2 participants

backreference with numbers

$> ruby-1.9.3-p362 -e "p 'hello'.gsub(/([aeiou])/, '{\1}')"     
$> rbx-head -X19 -e "p 'hello'.gsub(/([aeiou])/, '{\1}')"

backreference with named group

$> ruby-1.9.3-p362 -e "p 'hello'.gsub(/(?<foo>[aeiou])/, '{\k<foo>}')"
$> rbx-head -X19 -e "p 'hello'.gsub(/(?<foo>[aeiou])/, '{\k<foo>}')"

examples from ruby-docs


jamesotron commented Feb 15, 2013

Confirmed the same for me.

dbussink added a commit that referenced this issue Jul 21, 2013

@dbussink dbussink closed this in 91f0a52 Jul 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment