[#71439] [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API — matz@...
Issue #11339 has been updated by Yukihiro Matsumoto.
7 messages
2015/11/11
[#71473] Re: [Ruby trunk - Feature #11339] [PATCH] io.c: avoid kwarg parsing in C API
— Eric Wong <normalperson@...>
2015/11/13
Entire series for sockets
[#71450] Ruby 2.3.0-preview1 Released — "NARUSE, Yui" <naruse@...>
Hi,
5 messages
2015/11/11
[#71617] [Ruby trunk - Feature #11664] [PATCH] introduce rb_autoload_value to replace rb_autoload — nobu@...
Issue #11664 has been updated by Nobuyoshi Nakada.
3 messages
2015/11/20
[#71721] [Ruby trunk - Feature #11741] Migrate Ruby to Git from Subversion — me@...
Issue #11741 has been updated by Jon Moss.
4 messages
2015/11/28
[ruby-core:71713] [Ruby trunk - Bug #11519] "#{nil}" produces string as US-ASCII rather than current encoding
From:
nagachika00@...
Date:
2015-11-27 21:39:22 UTC
List:
ruby-core #71713
Issue #11519 has been updated by Tomoyuki Chikanaga.
Backport changed from 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE
Backported into `ruby_2_2` branch at r52773.
----------------------------------------
Bug #11519: "#{nil}" produces string as US-ASCII rather than current encoding
https://bugs.ruby-lang.org/issues/11519#change-55119
* Author: Perry Smith
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
* Backport: 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE
----------------------------------------
~~~ruby
#! /usr/bin/env ruby
# encoding: utf-8
puts "Ruby version: #{RUBY_VERSION}"
puts "__ENCODING__ = #{__ENCODING__}"
puts "hello".encoding
foo = "hello"
puts "#{foo}".encoding
puts "#{"hello"}".encoding
bar = nil
puts "#{bar}".encoding
puts "#{nil}".encoding
puts "#{bar}#{foo}".encoding
~~~
The output for this on all versions of ruby that I have except 1.9.1 is this:
~~~
Ruby version: 2.2.3
__ENCODING__ = UTF-8
UTF-8
UTF-8
UTF-8
US-ASCII
US-ASCII
US-ASCII
~~~
It is the last part that gave me grief. Rails `content_for` used such a construct so all my content was being converted to US-ASCII and sometimes were error off.
It seems to me the `"#{ ... }"` string should be utf-8 and so anything inserted into it should be converted to utf-8 so `"#{nil}"` should be utf-8 -- not US-ASCII.
--
https://bugs.ruby-lang.org/