[ruby-core:69721] Re: [Ruby trunk - Bug #11300] [Feedback] [PATCH] Add String#bin for parity with #hex and #oct.

From: Eric Wong <normalperson@...>
Date: 2015-06-24 03:01:54 UTC
List: ruby-core #69721
matz@ruby-lang.org wrote:
> 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?

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.

In This Thread

Prev Next