[#86520] [Ruby trunk Bug#14681] `syswrite': stream closed in another thread (IOError) — samuel@...
Issue #14681 has been reported by ioquatix (Samuel Williams).
3 messages
2018/04/12
[#86755] [Ruby trunk Feature#14723] [WIP] sleepy GC — normalperson@...
Issue #14723 has been reported by normalperson (Eric Wong).
6 messages
2018/04/29
[ruby-core:86567] [Ruby trunk Bug#14694] TracePoint#parameters
From:
mame@...
Date:
2018-04-18 02:07:24 UTC
List:
ruby-core #86567
Issue #14694 has been reported by mame (Yusuke Endoh).
----------------------------------------
Bug #14694: TracePoint#parameters
https://bugs.ruby-lang.org/issues/14694
* Author: mame (Yusuke Endoh)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Currently, we cannot get the block parameters' information in TracePoint b_call hooks.
Also, it is (possible but) not easy to get the method parameters in call hooks.
[1] https://speakerdeck.com/valich/automated-type-contracts-generation-1#29
To make it easy, how about adding TracePoint#parameters?
```
TracePoint.new(:call, :b_call, :c_call) do |tp|
p [tp.event, tp.parameters]
end
# call
def foo(a, b=1); end; foo(1)
#=> [:call, [[:req, :a], [:opt, :b]]]
# b_call
1.times {|x, y=1| }
#=> [:b_call, [[:req, :x], [:opt, :y]]]
# c_call
"".getbyte(0)
#=> [:c_call, [[:req]]]
````
A patch is attached.
---Files--------------------------------
tracepoint-parameters.patch (4.75 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>