[#60404] is RB_GC_GUARD needed in rb_io_syswrite? — Eric Wong <normalperson@...>
I haven't gotten it to crash as-is, but it seems like we need to
4 messages
2014/02/01
[#60682] volatile usages — Eric Wong <normalperson@...>
Hi all, I went ahead and removed some use of volatile which were once
5 messages
2014/02/13
[#60794] [RFC] rearrange+pack vtm and time_object structs — Eric Wong <normalperson@...>
Extracted from addendum on top of Feature #9362 (cache-aligned objects).
4 messages
2014/02/16
[#61139] [ruby-trunk - Feature #9577] [Open] [PATCH] benchmark/driver.rb: align columns in text output — normalperson@...
Issue #9577 has been reported by Eric Wong.
3 messages
2014/02/28
[ruby-core:60530] [ruby-trunk - Feature #9487] [Rejected] Add #dup?, #dup! and #clone? and #clone!
From:
matz@...
Date:
2014-02-06 08:01:24 UTC
List:
ruby-core #60530
Issue #9487 has been updated by Yukihiro Matsumoto.
Status changed from Open to Rejected
Assignee set to Yukihiro Matsumoto
Nice try. But dup! and clone! are not following the naming convention (adding ! to more dangerous version).
We are waiting for other naming candidates.
Matz.
----------------------------------------
Feature #9487: Add #dup?, #dup! and #clone? and #clone!
https://bugs.ruby-lang.org/issues/9487#change-44987
* Author: Atlas Prime
* Status: Rejected
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category: core
* Target version: next minor
----------------------------------------
Some objects can't use #dup or #clone b/c they are singleton, like Integer. So an error is raised if one tries.
> 5.dup
TypeError: can't dup Fixnum
It would helpful if there was an easy way to check if this is so on an arbitrary object without having to go through the overhead of rescuing the TypeError. e.g.
if o.dup?
x = o.dup
...
Even more convenient in some cases would not having to worry about it at all. If the object can't be duplicated or cloned then just return the object itself.
> 5.dup!
5
The same for `#clone` with `#clone?` and `#clone!`.
--
http://bugs.ruby-lang.org/