るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. rake empty_task_args
  2. optparse args
  3. closure args
  4. fiddle args
  5. parseerror args

検索結果

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

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

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

このメソッドはProcやメソッドが定義されたファイルを読み込む必要があるため、
irbのようなファイルを介さない対話的環境では動作しません。

@param proc Procもしくはメソッドオブジェクトを指定します。

//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:...

Enumerator#with_index(offset = 0) {|(*args), idx| ... } -> object (604.0)

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。

ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。

//emlist[例][ruby]{
str = "xyz"

enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]

require "stringi...

Enumerator::Lazy#with_index(offset = 0) {|(*args), idx| ... } -> Enumerator::Lazy (604.0)

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。

ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。

//emlist[][ruby]{
("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
# => 1:a
# 2:b
# 3:c
//}

@see Enumerator#with_index

Benchmark::Tms#format(fmtstr = nil, *args) -> String (358.0)

self を指定されたフォーマットで整形して返します。

self を指定されたフォーマットで整形して返します。

このメソッドは Kernel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。

: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの s...

Pathname#binwrite(string, offset=nil) -> Integer (349.0)

IO.binwrite(self.to_s, *args)と同じです。

IO.binwrite(self.to_s, *args)と同じです。


@see IO.binwrite

絞り込み条件を変える

DateTime#to_json(*args) -> String (340.0)

自身を JSON 形式の文字列に変換して返します。

自身を JSON 形式の文字列に変換して返します。

内部的にはハッシュにデータをセットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。

//emlist[例][ruby]{
require "json/add/core"

DateTime.now.to_json
# => "{\"json_class\":\"DateTime\",\"y\":2018,\"...

Process.exec(command, *args) -> () (340.0)

カレントプロセスを与えられた外部コマンドで置き換えます。

カレントプロセスを与えられた外部コマンドで置き換えます。


=== 引数の解釈

引数が一つだけ与えられた場合、command が shell のメタ文字
//emlist{
* ? {} [] <> () ~ & | \ $ ; ' ` " \n
//}
を含む場合、shell 経由で実行されます。
そうでなければインタプリタから直接実行されます。

引数が複数与えられた場合、第 2 引数以降は command に直接渡され、
インタプリタから直接実行されます。

第 1 引数が 2 要素の配列の場合、第 1 要素の文字列が実際に起動する
プログラムのパスで、第 2 要素が「みせかけ...

IO.read(path, length = nil, offset = 0, **opt) -> String | nil (319.0)

path で指定されたファイルを offset 位置から length バイト分読み込んで返します。

path で指定されたファイルを offset 位置から
length バイト分読み込んで返します。

既に EOF に達している場合は nil を返します。ただし、length に nil か 0 が指定されている場合は、空文字列 "" を返します。例えば、IO.read(空ファイル) は "" を返します。

引数 length が指定された場合はバイナリ読み込みメソッド、そうでない場合はテキスト読み込みメソッドとして
動作します。

Kernel.#open と同様 path の先頭が "|" ならば、"|" に続くコマンドの出力を読み取ります。

@param path ファイル名を...

Enumerator#with_index(offset = 0) -> Enumerator (304.0)

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。

ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。

//emlist[例][ruby]{
str = "xyz"

enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120, 0]
# [121, 1]
# [122, 2]

require "stringi...

Enumerator::Lazy#with_index(offset = 0) -> Enumerator::Lazy (304.0)

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。
インデックスは offset から始まります。

ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。

//emlist[][ruby]{
("a"..).lazy.with_index(1) { |it, index| puts "#{index}:#{it}" }.take(3).force
# => 1:a
# 2:b
# 3:c
//}

@see Enumerator#with_index

絞り込み条件を変える

1.6.8から1.8.0への変更点(まとめ) (199.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

1.6.8から1.8.0への変更点(まとめ)
* ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>))
* ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>))
* ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>))
* ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>))...

Module#ruby2_keywords(method_name, ...) -> nil (151.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument...

Proc#ruby2_keywords -> proc (151.0)

Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.

Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked ...

NEWS for Ruby 2.7.0 (73.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...

rubygems/commands/pristine_command (37.0)

インストールされている Gem パッケージを初期状態にするためのライブラリです。

インストールされている Gem パッケージを初期状態にするためのライブラリです。

Usage: gem pristine [args] [options]
Options:
--all インストールされている全ての Gem パッケージを
初期状態に戻します
-v, --version VERSION 指定したバージョンの Gem パッケージを
...

絞り込み条件を変える

クラス/メソッドの定義 (37.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined

===[a:class] クラス定義

//emlist[例][ruby]{
class Foo < S...