[#92070] [Ruby trunk Feature#15667] Introduce malloc_trim(0) in full gc cycles — sam.saffron@...
Issue #15667 has been updated by sam.saffron (Sam Saffron).
3 messages
2019/04/01
[ruby-core:92414] [Ruby trunk Bug#15786] numbered parameterを使ったprocのparametersに記号が現れる
From:
nobu@...
Date:
2019-04-26 04:26:24 UTC
List:
ruby-core #92414
Issue #15786 has been updated by nobu (Nobuyoshi Nakada).
Status changed from Open to Closed
Closed at 54eac83b2ad77ddea84fa6d66c09e0bb014cf61e
----------------------------------------
Bug #15786: numbered parameterを使ったprocのparametersに記号が現れる
https://bugs.ruby-lang.org/issues/15786#change-77773
* Author: tompng (tomoya ishida)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.7.0dev (2019-04-23 trunk f4f66bd11c) [x86_64-darwin17]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
~~~ruby
->{@100}.parameters.map{@2}.join
#=> "!\"\#$%&'()*+,-./:;<=>?@[\\]^`"
~~~
`proc{@100}.parameters` の場合はそれに加え、`[[:opt, nil]...]` になる
`RubyVM::InstructionSequence.of(->{@100}).to_a`
`RubyVM::InstructionSequence.disasm(->{@100})`
にも同様の記号が混ざる
`lambda{@100}.parameters` は `[[:req]]*100`
`proc{@100}.parameters` は `[[:opt, nil]]*100`ではなく`[[:opt]]*100`
になると良いのではないかと思います。(`1.method(:+).parameters #=> [[:req]]` とnilは含まれないのでそれに合わせて)
--
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>