[#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:60409] [ruby-trunk - Feature #8987] map/collect extension which handles arguments
From:
sawadatsuyoshi@...
Date:
2014-02-01 12:09:36 UTC
List:
ruby-core #60409
Issue #8987 has been updated by Tsuyoshi Sawada.
Probably, it makes more sense to extend the syntax of `Symbol#to_proc`. The conventional `Symbol#to_proc` does not take an argument:
:foo.to_proc # => ->(x){x.foo}
The proposal is to let it take optional arguments that would be passed to the method within the created proc:
:foo.to_proc(y) # => ->(x){x.foo(y)}
So that
:+.to_proc(4) # => ->(x){x + 4}
[1, 2, 3, 4].map(&:+.to_proc(4)) # => [5, 6, 7, 8]
Not sure if any better than writing the original, but looks consistent.
----------------------------------------
Feature #8987: map/collect extension which handles arguments
https://bugs.ruby-lang.org/issues/8987#change-44878
* Author: So Wieso
* Status: Open
* Priority: Normal
* Assignee:
* Category: core
* Target version: current: 2.2.0
----------------------------------------
Please consider extending map/collect by allowing additional arguments to be passed to proc, like:
A: [1,2,3,4].map :+, 4
and/or
B: [1,2,3,4].map 4, &:+
=> [5, 6, 7, 8]
Variant A is probably more readable. Variant B is more versatile (allows arbitrary arguments to be passed to block).
---Files--------------------------------
mappi.rb (410 Bytes)
--
http://bugs.ruby-lang.org/