Subject: [ruby-talk:01776] control characters and sub()
From: ts <decoux moulon.inra.fr>
Date: Tue, 7 Mar 2000 11:45:31 +0100 (MET)
the notation \cX don't work when used in sub() with //, it's normal ?
aestivum% cat b.rb
#!/usr/bin/ruby
a = "a" + 24.chr
p a
a.sub!(/\cX$/, '')
p a
a.sub!("\cX$", '')
p a
aestivum% b.rb
"a\030"
"a\030"
"a"
aestivum%
Guy Decoux