種類
- 関数 (36)
- マクロ (24)
- インスタンスメソッド (12)
ライブラリ
- ビルトイン (12)
クラス
キーワード
- INT2FIX (12)
- LONG2FIX (12)
-
rb
_ ary _ new3 (12) -
rb
_ ary _ store (12) -
rb
_ catch (12) -
to
_ a (12)
検索結果
先頭5件
-
VALUE INT2FIX(int i) (6100.0)
-
Fixnum におさまることが自明な整数を Fixnum に変換します。 なお、Fixnum の幅は long の幅 - 1 です。
Fixnum におさまることが自明な整数を Fixnum に変換します。
なお、Fixnum の幅は long の幅 - 1 です。 -
VALUE rb
_ ary _ new3(long n , VALUE i0 , i1 , i2 , . . . ) (18.0) -
長さ n で要素に i0 i1 i2 …を格納した Ruby の配列を作成し返します。
...n で要素に i0 i1 i2 …を格納した
Ruby の配列を作成し返します。
対応するRubyコード
ary = Array[i0, i1, i2...] または
ary = [i0, i1, i2...]
使用例
VALUE ary;
int i[3] = { 1, 2, 3 };
ary = rb_ary_new3(3, INT2FIX(i[0]), INT2FIX(i[1]), INT2FIX(i[2]));... -
VALUE LONG2FIX(long i) (16.0)
-
INT2FIX と同じです。
...
INT2FIX と同じです。... -
RubyVM
:: InstructionSequence # to _ a -> Array (6.0) -
self の情報を 14 要素の配列にして返します。
..., :local_size=>2, :stack_max=>2},
# "<compiled>",
# "<compiled>",
# nil,
# 1,
# :top,
# [:num],
# 0,
# [],
# [1,
# [:trace, 1],
# [:putobject_OP_INT2FIX_O_1_C_],
# [:putobject, 2],
# [:opt_plus, {:mid=>:+, :flag=>256, :orig_argc=>1, :blockptr=>nil}],
# [:dup],
# [:setlocal_OP__WC__0, 2],
# [:... -
VALUE rb
_ catch(const char *tag , VALUE (*proc)() , VALUE data) (6.0) -
catch と同等の動作を実行します。
...oo_yield(VALUE a, VALUE b)
{
return rb_yield(b);
}
static VALUE
foo_catch(VALUE obj)
{
return rb_catch("footag", foo_yield, INT2FIX(2));
}
static VALUE
foo_abort(VALUE obj)
{
return rb_throw("footag", Qnil);
}
void
Init_foo(void)
{
VALUE Foo = rb_... -
void rb
_ ary _ store(VALUE ary , long idx , VALUE val) (6.0) -
配列 ary のインデックス idx に val を格納します。idx が範囲を越えるときは Ruby レベルと同じく自動的にサイズが拡張されます。
...を越えるときは
Ruby レベルと同じく自動的にサイズが拡張されます。
対応するRubyコード
ary[idx] = val
使用例
VALUE ary;
int idx;
int n[5] = { 1, 2, 3, 4, 5 };
ary = rb_ary_new();
for (idx=0; idx<5; idx++) rb_ary_store(ary, idx, INT2FIX(n[idx]));...