method
mb_chars
v3.0.7 -
Show latest stable
-
1 note -
Class: String
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.2
- 2.3.8
- 3.0.0 (0)
- 3.0.5 (-38)
- 3.0.7 (0)
- 3.0.9 (37)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
Register or
log in
to add new notes.
jrochkind -
September 27, 2011 - (>= v3.1.0)
0 thanks
1.9 behavior
“In Ruby 1.9 and newer mb_chars returns self’”
This would seem to be a lie. At least in rails 3.1.0 and ruby 1.9.2, mb_chars still returns a proxy object with additional useful methods defined on it that aren’t on a 1.9.2 String.
ruby-1.9.2-p180 :007 > "àáâãäå".normalize(:kd) NoMethodError: undefined method `normalize' for "àáâãäå":String ruby-1.9.2-p180 :008 > "àáâãäå".mb_chars.normalize(:kd) => àáâãäå


