Project

General

Profile

Actions

Bug #1695

closed

String interpolation Issue with escape characters inside an in-string evaluated statement

Added by crash2burn (Jason Pearlman) almost 15 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.1p129 (2009-05-12 revision 23412) [x86_64-linux]
Backport:
[ruby-core:24051]

Description

=begin
Apologies if this has already been addressed but I could not find anything:

Alone, works fine

'a'.gsub("'",'\'')
=> "a"

Inside a string in #{} - bombs

"hi #{'a'.gsub("'",'\'')}"
[just waits for another "]
"
SyntaxError: compile error
(irb):20: unterminated string meets end of file
from (irb):20
=end

Actions #1

Updated by runpaint (Run Paint Run Run) almost 15 years ago

=begin
(Deleted).
=end

Actions #2

Updated by crash2burn (Jason Pearlman) almost 15 years ago

=begin
Thanks! If anything this seems more on the IRB side of things.
=end

Actions #3

Updated by nobu (Nobuyoshi Nakada) almost 15 years ago

  • Category set to lib
  • Assignee set to keiju (Keiju Ishitsuka)

=begin

=end

Actions #4

Updated by yugui (Yuki Sonoda) over 14 years ago

  • Status changed from Open to Assigned
  • Priority changed from Normal to 3
  • Target version set to 1.9.2

=begin

=end

Actions #5

Updated by keiju (Keiju Ishitsuka) over 14 years ago

  • Status changed from Assigned to Closed

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0