< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #16297 has been reported by nobu (Nobuyoshi Nakada).
----------------------------------------
Bug #16297: calling undefined allocator by `Class.instance_method(:allocate)`
https://bugs.ruby-lang.org/issues/16297
* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v:
* Backport: 2.5: REQUIRED, 2.6: REQUIRED
----------------------------------------
For instance, `Rational.allocate` is undefined.
```ruby
Rational.allocate #=> undefined method `allocate' for Rational:Class (NoMethodError)
```
But it can be called by `Class.instance_method(:allocate)`.
```ruby
Class.instance_method(:allocate).bind_call(Rational) #=> (0/1)
Class.instance_method(:allocate).bind(Rational).call #=> (0/1)
```
These allocators are defined for Marshal, and undefined as methods.
--
https://bugs.ruby-lang.org/