Project

General

Profile

Actions

Bug #2501

closed

\c before a hex or octal encoded character is no longer allowed

Bug #2501: \c before a hex or octal encoded character is no longer allowed

Added by coatl (caleb clausen) almost 16 years ago. Updated over 14 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.1p376 (2009-12-07 revision 26040 [x86_64-linux]
Backport:
[ruby-core:27229]

Description

=begin
Ruby 1.8 used to allow this:
"\c\x33" #(0x33 is the ascii code for '3')
as meaning the same thing as this:
"\c3"
However, it now (in ruby 1.9.1) causes a syntax error. Likewise with octal escape sequences. Is this an intentional change? It seems like an unnecessary restriction.

Tested in 1.9.1; I have no 1.9.2 handy to test with.
=end

Updated by naruse (Yui NARUSE) almost 16 years ago Actions #1

  • Category set to core
  • Status changed from Open to Assigned
  • Assignee set to matz (Yukihiro Matsumoto)

=begin
This also affect 1.9 and seems intentional in r13836.
=end

Updated by mame (Yusuke Endoh) over 15 years ago Actions #2

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27847.
caleb, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: PDF Atom