Actions
Feature #11300
closed[PATCH] Add String#bin for parity with #hex and #oct.
Feature #11300: [PATCH] Add String#bin for parity with #hex and #oct.
Status:
Feedback
Assignee:
-
Target version:
-
Description
Files
Updated by matz (Yukihiro Matsumoto) over 10 years ago
- Status changed from Open to Feedback
Two points. Unlike #hex and #oct, there's little demand for 0/1 strings conversion.
Besides that, String#bin can be easily confused with "binary (raw) encoding" and cause more surprise.
Any opinion?
Matz.
Updated by normalperson (Eric Wong) over 10 years ago
matz@ruby-lang.org wrote:
Two points. Unlike
#hexand#oct, there's little demand for 0/1 strings conversion.
Besides that,String#bincan be easily confused with "binary (raw) encoding" and cause more surprise.
Any opinion?
I agree it is potentially confusing with String#b and redundant.
I even wish redundant methods like String#hex and String#oct can go away,
too; String#to_i is enough.
Updated by jeremyevans0 (Jeremy Evans) over 6 years ago
- Tracker changed from Bug to Feature
- Backport deleted (
2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN)
Actions