[#68845] [Ruby trunk - Feature #11056] [PATCH] lib/net/*: use io/wait methods instead of IO.select — normalperson@...
Issue #11056 has been updated by Eric Wong.
3 messages
2015/04/11
[#68945] [Ruby trunk - Feature #11083] [Open] Gemify net-telnet — shibata.hiroshi@...
Issue #11083 has been reported by Hiroshi SHIBATA.
4 messages
2015/04/21
[#68951] Re: [Ruby trunk - Feature #11083] [Open] Gemify net-telnet
— Eric Wong <normalperson@...>
2015/04/21
shibata.hiroshi@gmail.com wrote:
[#69012] [Ruby trunk - Feature #11105] [Open] ES6-like hash literals — shugo@...
Issue #11105 has been reported by Shugo Maeda.
5 messages
2015/04/29
[ruby-core:68962] [Ruby trunk - Bug #11086] Symbol#instance_eval gives 'TypeError: can't define singleton' when coerced with String#to_sym
From:
thijs@...
Date:
2015-04-22 14:01:13 UTC
List:
ruby-core #68962
Issue #11086 has been updated by Thijs Wouters.
File test.patch added
I added a patch with a failing test.
----------------------------------------
Bug #11086: Symbol#instance_eval gives 'TypeError: can't define singleton' when coerced with String#to_sym
https://bugs.ruby-lang.org/issues/11086#change-52218
* Author: Thijs Wouters
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
When I coerce a String into a Symbol with String#to_sym, a call to Symbol#instance_eval fails with 'TypeError: can't define singleton'. If I first define the Symbol, it works as expected.
Failure:
~~~
2.2.1 :001 > "test_symbol".to_sym.instance_eval{true}
TypeError: can't define singleton
from (irb):1:in `instance_eval'
from (irb):1
from /home/xxx/.rvm/rubies/ruby-2.2.1/bin/irb:11:in `<main>'
2.2.1 :002 > :test_symbol.instance_eval{true}
TypeError: can't define singleton
from (irb):2:in `instance_eval'
from (irb):2
from /home/xxx/.rvm/rubies/ruby-2.2.1/bin/irb:11:in `<main>'
2.2.1 :003 > exit
~~~
Other way around:
~~~
2.2.1 :001 > :test_symbol.instance_eval{true}
=> true
2.2.1 :002 > "test_symbol".to_sym.instance_eval{true}
=> true
2.2.1 :003 > exit
~~~
This also fails in 2.2.0, but does not in 2.1.5.
---Files--------------------------------
test.patch (444 Bytes)
--
https://bugs.ruby-lang.org/