別のキーワード
種類
- 文書 (47)
- インスタンスメソッド (38)
- 特異メソッド (26)
- ライブラリ (12)
ライブラリ
- ビルトイン (26)
- json (24)
-
minitest
/ unit (2) - win32ole (12)
クラス
-
JSON
:: State (24) - Struct (16)
- WIN32OLE (12)
モジュール
キーワード
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 1 . 0 (4) - [] (4)
-
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
buffer
_ initial _ length (12) -
buffer
_ initial _ length= (12) - new (12)
-
ole
_ activex _ initialize (12) -
rdoc
/ parser / c (12) -
ruby 1
. 8 . 4 feature (12)
検索結果
先頭5件
- RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node - MiniTest
:: Assertions # assert _ kind _ of(klass , object , message) -> true - MiniTest
:: Assertions # assert _ instance _ of(klass , object , message = nil) -> true
-
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...