< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
It seems like a number of methods have unexpected arities. For example,
Array#[]
$ ruby -e "puts Array.method(:[]).arity; x = [1,2,3]; x[]"
-1
-e:1:in `[]': wrong number of arguments (0 for 1) (ArgumentError)
from -e:1
RDoc for Array#[] seems to also show that at least one argument is required:
--------------------------------------------------------------- Array#[]
array[index] -> obj or nil
array[start, length] -> an_array or nil
array[range] -> an_array or nil
array.slice(index) -> obj or nil
array.slice(start, length) -> an_array or nil
array.slice(range) -> an_array or nil
I've been running into a number of these. We have been trying to get all
methods and arities matching in JRuby, but these numbers don't seem to
make sense. Should they be corrected in Ruby?
- Charlie