るりまサーチ

最速Rubyリファレンスマニュアル検索!
123件ヒット [1-100件を表示] (0.024秒)

別のキーワード

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

検索結果

<< 1 2 > >>

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

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

...byVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end

pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SC...
...OPE@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:
# (FCALL@6:2-...

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

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

...byVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end

pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SC...
...OPE@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:
# (FCALL@6:2-...

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

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

...byVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))

def hello
puts "hello, world"
end

pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SC...
...OPE@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:
# (FCALL@6:2-...

MiniTest::Assertions#assert_kind_of(klass, object, message) -> true (9113.0)

与えられたオブジェクトが与えられたクラスまたはそのサブクラスのインスタンス である場合、検査にパスしたことになります。

...結果を使用します。

@raise MiniTest::Assertion 与えられたオブジェクトが与えられたクラスまたはそのサブクラスの
インスタンスではない場合に発生します。

@see Object#kind_of?, MiniTest::Assertions#assert_instance_of...

MiniTest::Assertions#assert_instance_of(klass, object, message = nil) -> true (9107.0)

与えられたオブジェクトが与えられたクラスの直接のインスタンスである場合、検査にパスしたことになります。

...Proc#call した
結果を使用します。

@raise MiniTest::Assertion 与えられたオブジェクトが与えられたクラスの直接のインスタンスでない
場合に発生します。

@see Module#===, MiniTest::Assertions#assert_kind_of...

絞り込み条件を変える

JSON::State#buffer_initial_length -> Integer (6116.0)

This integer returns the current initial length of the buffer.

...This integer returns the current initial length of the buffer....

JSON::State#buffer_initial_length=(length) (6116.0)

This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.

...This sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed....

WIN32OLE#ole_activex_initialize -> nil (6106.0)

ActiveXコントロール用の初期化を行います。

...ActiveXコントロール用の初期化を行います。

ole_activex_initializeメソッドは、スクリプト内でActiveXコントロールを利
用できるように、オブジェクトが持つ永続化データを初期化します。

ActiveXコントロール(OCX)は、主にUI用...
...ンターフェイスを持たない場合に通知します。

obj = WIN32OLE.new("ProgID_or_GUID_of_ActiveX_Control")
obj.ole_activex_initialize
obj.method(...)

なお、生成したOLEオートメーションサーバが永続化データの初期化を必要...

Struct.new(*args, keyword_init: nil) -> Class (138.0)

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

...のが無難です。

@param args 構造体を定義するための可変長引数。String または Symbol を指定します。
@param keyword_init true を指定すると、キーワード引数で初期化する構造体を定義します。
Ruby 3.1 では互換性に影...
...待する構造体には明示的に false を指定してください。

//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)...
...Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).

# keyword_init: falseを指定すると警告は出ない
Point2 = Struct.new(:x, :y, keyword_init: false)
Point2.new(x: 1, y: 2) # => #<st...

Struct.new(*args, keyword_init: nil) {|subclass| block } -> Class (138.0)

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

...のが無難です。

@param args 構造体を定義するための可変長引数。String または Symbol を指定します。
@param keyword_init true を指定すると、キーワード引数で初期化する構造体を定義します。
Ruby 3.1 では互換性に影...
...待する構造体には明示的に false を指定してください。

//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)...
...Passing only keyword arguments to Struct#initialize will behave differently from Ruby 3.2. Please use a Hash literal like .new({k: v}) instead of .new(k: v).

# keyword_init: falseを指定すると警告は出ない
Point2 = Struct.new(:x, :y, keyword_init: false)
Point2.new(x: 1, y: 2) # => #<st...

絞り込み条件を変える

Struct.new(*args, keyword_init: nil) -> Class (132.0)

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

...のが無難です。

@param args 構造体を定義するための可変長引数。String または Symbol を指定します。
@param keyword_init 構造体クラスのインスタンスを生成する際に、キーワード引数を使用するかどうかを指定します。値の意味は...
...# => #<struct Point1 x=nil, y=2>
Point1.new(x: 1, y: 2, z: 3) # => ArgumentError (unknown keywords: z)

Point2 = Struct.new(:x, :y, keyword_init: nil)
Point2.new(1, 2) # => #<struct Point2 x=1, y=2>
Point2.new(x: 1, y: 2) # => #<struct Point2 x=1, y=2>
Point2.new(x: 1)...
...x=nil, y=2>
Point2.new(x: 1, y: 2, z: 3) # => ArgumentError (unknown keywords: z)

Point3 = Struct.new(:x, :y, keyword_init: true)
Point3.new(1, 2) # => wrong number of arguments (given 2, expected 0) (ArgumentError)
Point3.new(x: 1, y: 2) # => #<struct Point3 x=1, y=2>
Point3.new...

Struct.new(*args, keyword_init: nil) {|subclass| block } -> Class (132.0)

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

...のが無難です。

@param args 構造体を定義するための可変長引数。String または Symbol を指定します。
@param keyword_init 構造体クラスのインスタンスを生成する際に、キーワード引数を使用するかどうかを指定します。値の意味は...
...# => #<struct Point1 x=nil, y=2>
Point1.new(x: 1, y: 2, z: 3) # => ArgumentError (unknown keywords: z)

Point2 = Struct.new(:x, :y, keyword_init: nil)
Point2.new(1, 2) # => #<struct Point2 x=1, y=2>
Point2.new(x: 1, y: 2) # => #<struct Point2 x=1, y=2>
Point2.new(x: 1)...
...x=nil, y=2>
Point2.new(x: 1, y: 2, z: 3) # => ArgumentError (unknown keywords: z)

Point3 = Struct.new(:x, :y, keyword_init: true)
Point3.new(1, 2) # => wrong number of arguments (given 2, expected 0) (ArgumentError)
Point3.new(x: 1, y: 2) # => #<struct Point3 x=1, y=2>
Point3.new...

ruby 1.8.4 feature (102.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...
...05 Guy Decoux <ts@moulon.inra.fr>
#
# * re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
# [ruby-core:06721]

sizeof(long) > sizeof(int) な環境で、ハッシュ関数のオーバー
フローのためにStringをキーとしたHashの検索が失敗していたバ...

NEWS for Ruby 3.1.0 (36.0)

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

...は、

//emlist[][ruby]{
foo[0] = bar
//}

* 次の評価順序になります。

//emlist{
1. `foo`
2. `bar`
3. `[]=` called on the result of `foo`
//}

* Ruby 3.1.0より前は、多重代入の評価順序が上記のようではありませんでした。このコードでは、

//e...
...n the result of `foo`
5. `bar`
6. `baz=` called on the result of `bar`
//}

* Ruby 3.1.0から単一代入と評価順序が一致するようになり、左が右より先に評価されます。

//emlist{
1. `foo`
2. `bar`
3. `a`
4. `b`
5. `[]=` called on the result of `foo`
6....
...することができます。 17795

* Struct
* 新規メソッド
* StructClass#keyword_init? が追加されました。 18008
* 変更されたメソッド
* Struct#initialize はキーワード引数のみを渡すと警告されるようになりました。ハッシュ...

NEWS for Ruby 2.1.0 (30.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 の性能向上...
...nel#singleton_method(Object#singleton_method)

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

絞り込み条件を変える

rdoc/parser/c (30.0)

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

...Array#flatten の場合。rb_ary_flatten のコメントが解析されます。

/*
* Returns a new array that is a one-dimensional flattening of this
* array (recursively). That is, for every element that is an array,
* extract its elements into the new array.
*
* s = [ 1, 2,...
...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...

NEWS for Ruby 2.2.0 (24.0)

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

...りました。
* ArgumentError is no longer raised when lambda Proc is passed as a
block, and the number of yielded arguments does not match the formal
arguments of the lambda, if just an array is yielded and its length
matches.

* Process
* Process.spawn のようなプ...
...e_error" というキーワード引数を受け付けるようになりました

* Matrix
* 追加: Matrix#first_minor
* 追加: Matrix#cofactor
* 追加: Matrix#adjugate
* 追加: Matrix#hstack, Matrix#vstack
* 追加: Matrix#laplace_expansion
* 追加: Vector.basis...
...ttyprint
* PrettyPrint#first? は削除しました。

* lib/minitest/*.rb
* mintest 5 と衝突するので削除しました。9711

* lib/test/**/*.rb
* minitest 5 と衝突するので削除しました。minitest 4 の単なるラッパーだった。9711

* uri
* 3986...
<< 1 2 > >>