Feature #5361

Lice?

Added by Thomas Sawyer over 3 years ago. Updated almost 3 years ago.

[ruby-core:39691]
Status:Rejected
Priority:Normal
Assignee:Yukihiro Matsumoto

Description

Err... why is there a new String method for getting the lice of bytes?

'hello'.byteslice(2, 2) # => "ll"

I don't like getting lice ;)

(In other words what happened to good old readable underscores?)

feature_5361.patch Magnifier (1.73 KB) Ayumu AIZAWA, 01/04/2012 07:35 PM

History

#1 Updated by Andrew Grimm over 3 years ago

Ruby 1.9.3 has been released with the method spelt byteslice. I suspect it will make this spelling change less likely, as people won't want to use byte_slice in Ruby 2.0 but remember to use byteslice in Ruby 1.9.3 patchlevel 0.

#2 Updated by Ayumu AIZAWA about 3 years ago

  • Target version set to 2.0.0

#3 Updated by Ayumu AIZAWA about 3 years ago

  • File add-alias_methods.patch added

I'm proposing patch on

#4 Updated by Ayumu AIZAWA about 3 years ago

$B$"$$$6$o$G$9!#(B

byteslice$B$H$$$&%a%=%C%IL>$@$H(Bbytes lice$B$HFI$a$F$7$$C$F%$%1$F$J$$$H$$$&$3$H$N$h$&$G$9$,!"(B
alias$B$G(Bbyte_slice$B$H$$$&%a%=%C%I$rMQ0U$9$k$N$O$$$+$,$G$7$g$&$+!#(B
$BF1$8$h$&$JM}M3$GL>A0$,JQ$@!J$H$$$o$l$=$&$J!K%a%=%C%I$K(B bytesize $B$,$"$j$$9$N$G$3$A$i$b(B
byte_size $B$H$$$&(B alias $B$rMQ0U$7$F$O$$$+$,$G$7$g$&$+!#(B

#5 Updated by Ayumu AIZAWA about 3 years ago

  • File deleted (add-alias_methods.patch)

#6 Updated by Ayumu AIZAWA about 3 years ago

  • File deleted (add-alias_methods.patch)

#7 Updated by Ayumu AIZAWA about 3 years ago

add documentation for byte_slice and byte_size.

#8 Updated by Yusuke Endoh almost 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to Yukihiro Matsumoto

#9 Updated by Yukihiro Matsumoto almost 3 years ago

  • Status changed from Assigned to Rejected

Don't deny your potential to learn.

Matz.

#10 Updated by Thomas Sawyer almost 3 years ago

Or to get bit!

Also available in: Atom PDF