るりまサーチ

最速Rubyリファレンスマニュアル検索!
1849件ヒット [1601-1700件を表示] (0.030秒)

別のキーワード

  1. cgi element_init
  2. cgi/html element_init
  3. irb/ext/save-history init_save_history
  4. rake init
  5. inspector init

キーワード

検索結果

<< < ... 15 16 17 18 19 > >>

Thread::Backtrace::Location (18.0)

Ruby のフレームを表すクラスです。

...rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.to_s
end
//}

例2の実行結果:

init
.rb:4:in `initialize'
init
.rb:8:in `new'
init
.rb:8:in `<main>'

=== 参考

* Ruby VM ア...

rdoc/parser/c (18.0)

C 言語で記述されたソースコードから組み込みクラス/モジュールのドキュメン トを解析するためのサブライブラリです。

...rb_ary_flatten_bang(ary);
return ary;
}

...

void
Init
_Array()
{
...
rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);

上記の例の場合、rb_ary_flatten 関数と Init_Array 関数は同じファイルに記
述されている必要があり...
...指定した Ruby のクラスのものに指定します。同じ
.c ファイルに複数のクラス定義がある場合などのように、Init_xxx 関数の
xxx の部分がクラス名と同一ではない場合に使用します。

: Document-method: name

記述する内容を name...

ruby 1.8.4 feature (18.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...* ((<ruby 1.8.4 feature/"Ruby/Tk">))
* ((<ruby 1.8.4 feature/REXML [compat]>))
* ((<ruby 1.8.4 feature/TCPSocket#initialize [bug]>))
* ((<ruby 1.8.4 feature/TCPServer#initialize [bug]>))
* ((<ruby 1.8.4 feature/"optparse">))
* ((<ruby 1.8.4 feature/"find">))
* ((<ruby 1.8.4 feature/Ic...
...しました。((<ruby-dev:27964>))

module Foo
def initialize
super
end
end

class Bar
include Foo
def initialize
Foo.instance_method(:initialize).bind(self).call
end
end

Bar.new...
...# => ruby 1.8.3 (2005-09-21) [i686-linux]
-:3:in `initialize': method `initialize' called on terminated object (0xb7dd2bec) (NotImplementedError)
from -:10:in `initialize'
from -:14
# => ruby 1.8.4 (2005-12-16) [i686-linux]

: set_trace_func [...

Process.#ppid -> Integer (16.0)

親プロセスのプロセス ID を返します。UNIX では実際の親プロセスが終 了した後は ppid は 1 (initの pid)になります。

...親プロセスのプロセス ID を返します。UNIX では実際の親プロセスが終
了した後は ppid は 1 (initの pid)になります。

@see getppid(2)...

NEWS for Ruby 2.1.0 (12.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...す。

* GC
* 改良: RGenGC として知られている世代別GCが導入しました
* 追加した環境変数
* RUBY_GC_HEAP_INIT_SLOTS
* RUBY_GC_HEAP_FREE_SLOTS
* RUBY_GC_HEAP_GROWTH_FACTOR
* RUBY_GC_HEAP_GROWTH_MAX_SLOTS
* RUBY_GC_MALLOC_LIMIT_MAX...
...* 廃止した環境変数
* RUBY_FREE_MIN (RUBY_GC_HEAP_FREE_SLOTS を代わりに使います)
* RUBY_HEAP_MIN_SLOTS (RUBY_GC_HEAP_INIT_SLOTS を代わりに使います)

* Integer
* 追加: Fixnum#bit_length
* 追加: Bignum#bit_length
* Bignum の性能向上...
...on_method)

* Module
* 追加: Module#using, which activates refinements of the specified module only
in the current class or module definition.
* 追加: Module#singleton_class? レシーバーが特異クラスであれば true を返します。
レシーバーが通常の...

絞り込み条件を変える

OptionParser#on_head(*arg, &block) -> self (12.0)

オプションを取り扱うためのブロックを自身の持つリストの最初に登録します。

...][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

puts opts.help

# => Usage: test [options]
# -i, --init
# -u, --update
# -h, --help
//}

@see OptionParser#on, OptionParser#on_tail...

OptionParser#on_tail(*arg, &block) -> self (12.0)

オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。

...[ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

puts opts.help

# => Usage: test [options]
# -i, --init
# -u, --update
# -h, --help
//}

//emlist[例][ruby]{
require "optparse"

opts...

OptionParser#to_a -> [String] (12.0)

サマリの各行を要素とした配列を返します。

...を返します。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.to_a # => ["Usage: test [options]", " -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}...

RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node (12.0)

引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。

...))
# => (SCOPE@5:0-7:3
# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
#...

RubyVM::AbstractSyntaxTree.of(proc, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node (12.0)

引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。

...))
# => (SCOPE@5:0-7:3
# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
#...

絞り込み条件を変える

Struct.new(*args) -> Class (12.0)

Struct クラスに新しいサブクラスを作って、それを返します。

...るための可変長引数。String または Symbol を指定します。

//emlist[例][ruby]{
Point = Struct.new(:x, :y, keyword_init: true) # => Point(keyword_init: true)
Point.new(x: 1, y: 2) # => #<struct Point x=1, y=2>
Point.new(x: 1) # => #<struct Point x=1, y=nil>
Point.new(y: 2)...
<< < ... 15 16 17 18 19 > >>