Skip to content

Symbol#inspect differs from MRI Ruby #2896

Closed
@k77ch7

Description

@k77ch7

The following symbol_test.rb differs from MRI Ruby. The different result occurs in the case of UTF8 string symbol.

symbol_test.rb

# encoding: utf-8

p :"Ãa1".inspect
p :"a1".inspect
p :"1".inspect

MRI Ruby 1.9.3, 2.0.0, 2.1.4 and 2.2,1

$ ruby ~/development/symbol_test.rb
":Ãa1"
":a1"
":\"1\""

JRuby master and 1_7 branch

$ jruby ~/development/symbol_test.rb
":\"Ãa1\""
":a1"
":\"1\""

My env

jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-04-30 1cade78 Java HotSpot(TM) 64-Bit Server VM 25.5-b02 on 1.8.0_05-b13 +jit [darwin-x86_64]

jruby 1.7.20-SNAPSHOT (1.9.3p551) 2015-04-30 5fd659d on Java HotSpot(TM) 64-Bit Server VM 1.8.0_05-b13 +jit [darwin-x86_64]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions