Project

General

Profile

Actions

Bug #10924

closed

String#b

Added by trans (Thomas Sawyer) about 9 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:68372]

Description

Well, I just learned about the String#b method today. And of course it breaks the Radix gem :-( Honestly, back when I create Radix in 2009 I could not have imagined a safer bet than #b for an extension if I tried. And yet sure enough, Ruby makes String#b an official method for converting to ASCII 8-bit. Is it really such a popular method to get such a short name? I mean String#ascii wouldn't have been a better choice? To go along with #ascii_only?

Okay, so much for my mini-rant. So bottom line, can I ask that this method not be called #b? Even putting the conflict with Radix aside, I think it's a pretty bad name for a standard Ruby method. Just read it: "#b". Do you have any idea what that does without looking it up in the documentation? Nope, no way.

(P.S. Bug or feature, not sure what to label it. Left it a bug b/c it did break people's code.)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0