Project

General

Profile

This project is closed and read-only.

Actions

Backport #5287

closed

1.9.3 - Interpolation in a string causes the string's encoding to be set to ASCII-8BIT

Backport #5287: 1.9.3 - Interpolation in a string causes the string's encoding to be set to ASCII-8BIT

Added by jonleighton (Jon Leighton) about 15 years ago. Updated almost 15 years ago.

Status:
Closed
[ruby-core:39309]

Description

There appears to be a bug with the encoding of interpolated strings on 1.9.3.

Here is a comparison of versions:

1.9.2

ruby-1.9.2-p290 :001 > a = ""
=> ""
ruby-1.9.2-p290 :002 > a.encoding
=> #Encoding:UTF-8
ruby-1.9.2-p290 :003 > "#{a}".encoding
=> #Encoding:UTF-8

1.9.3-head

ruby-1.9.3-head :004 > a = ""
=> ""
ruby-1.9.3-head :005 > a.encoding
=> #Encoding:UTF-8
ruby-1.9.3-head :006 > "#{a}".encoding
=> #Encoding:ASCII-8BIT

ruby-head

ruby-head :003 > a = ""
=> ""
ruby-head :004 > a.encoding
=> #Encoding:UTF-8
ruby-head :005 > "#{a}".encoding
=> #Encoding:UTF-8


Related issues 1 (0 open1 closed)

Is duplicate of Ruby - Bug #5126: Unicode character classes interpolated into regex throws exceptionClosedActions
Actions

Also available in: PDF Atom