Project

General

Profile

Actions

Feature #5607

closed

Inconsistent reaction in Range of String

Added by maso (Yen-Nan Lin) over 12 years ago. Updated over 3 years ago.

Status:
Closed
Target version:
-
[ruby-core:<unknown>]

Description

=begin
When I tried to access excel file, I found some inconsistent behavior about range of string.

ruby-1.9.3-p0 :001 > ("A".."AB").to_a
=> ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "AA", "AB"]

This behavior is as what I thought.

ruby-1.9.3-p0 :002 > ("X".."AB").to_a
=> []

However, I tried to access "X" to "AB", and its reaction is inconsistent with above example.

I hope that behavior would be consistent in future release.

Thanks!
=end


Related issues 3 (0 open3 closed)

Related to Ruby master - Feature #2323: "Z".."Z".succが空Closedmatz (Yukihiro Matsumoto)Actions
Related to Ruby master - Bug #6258: String#succ has suprising behavior for "\u1036" (MYANMAR SIGN ANUSVARA), producing "\u1000" instead of "\u1037"Closedduerst (Martin Dürst)Actions
Has duplicate Ruby master - Bug #13663: `String#upto` doesn't work as expectedClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0