Project

General

Profile

Actions

Feature #1835

closed

0x80.chr not equal to "\x80"

Added by phasis68 (Heesob Park) over 14 years ago. Updated almost 13 years ago.

Status:
Rejected
Target version:
[ruby-core:24603]

Description

=begin
I suggest 0x80.chr should be equal to "\x80" regardless of locale.

Here is the current behavior:

irb(main):001:0> 0x80.chr.encoding
=> #Encoding:ASCII-8BIT
irb(main):002:0> "\x80".encoding
=> #Encoding:UTF-8
irb(main):003:0> 0x80.chr=="\80"
=> false
irb(main):004:0> h={}
=> {}
irb(main):005:0> h[0x80.chr]=1
=> 1
irb(main):006:0> h["\x80"]=2
=> 2
irb(main):007:0> h
=> {"\x80"=>1, "\x80"=>2}
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0