Ruby 初心者スレッド Part 34
■ このスレッドは過去ログ倉庫に格納されています
0236デフォルトの名無しさん
2010/02/05(金) 20:36:29Rubyはソースコードに全て書いてある
/*
* call-seq:
* sym.to_proc
*
* Returns a _Proc_ object which respond to the given method by _sym_.
*
* (1..3).collect(&:to_s) #=> ["1", "2", "3"]
*/
static VALUE
sym_to_proc(VALUE sym)
{
return rb_proc_new(sym_call, (VALUE)SYM2ID(sym));
}
ほら書いてあった
■ このスレッドは過去ログ倉庫に格納されています