るりまサーチ (Ruby 3.1)

最速Rubyリファレンスマニュアル検索!
30件ヒット [1-30件を表示] (0.071秒)
トップページ > クエリ:>[x] > クエリ:name[x] > クエリ:with[x] > バージョン:3.1[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. integer >
  5. float >

検索結果

Method#name -> Symbol (54658.0)

このメソッドの名前を返します。

このメソッドの名前を返します。

//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.name # => :foo
//}

REXML::Element#each_element_with_text(text = nil, max = 0, name = nil) {|element| ... } -> () (19195.0)

テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。

テキストを子ノードとして
持つすべての子要素を引数としてブロックを呼び出します。

text を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見なされ、
それにマッチするもののみが対象となります。

max に 0 を指定すると、max の指定は無視されます(0個ではありません)。

@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列

...

REXML::Element#each_element_with_attribute(key, value = nil, max = 0, name = nil) {|element| ... } -> () (19015.0)

特定の属性を持つすべての子要素を引数としてブロックを呼び出します。

特定の属性を持つすべての子要素を引数としてブロックを呼び出します。

key で指定した属性名の属性を持つ要素のみを対象とします。
value を指定すると、keyで指定した属性名を持つ属性の値がvalueである
もののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見なされ、
それにマッチするもののみが対象となります。

max に 0 を指定すると、max の指定は無視されます(0個ではありません)。

@param key 属性名(文字列)
@param value 属性値(文字列)
...

Rake::TaskManager#enhance_with_matching_rule(task_name, level = 0) -> Rake::Task | nil (18925.0)

与えられたタスク名にマッチしたルールが存在する場合は、そのタスクに見つかったルールの 事前タスクとアクションを追加して返します。

与えられたタスク名にマッチしたルールが存在する場合は、そのタスクに見つかったルールの
事前タスクとアクションを追加して返します。

@param task_name タスクの名前を指定します。

@param level 現在のルール解決のネストの深さを指定します。

@raise RuntimeError ルールの解決時にオーバーフローした場合に発生します。

Rake::TaskArguments#with_defaults(defaults) -> Hash (18766.0)

パラメータにデフォルト値をセットします。

パラメータにデフォルト値をセットします。

@param defaults デフォルト値として使用するキーと値を格納したハッシュを指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.to_hash ...

絞り込み条件を変える

Pathname#each_child(with_directory = true) {|pathname| ...} -> [Pathname] (10561.0)

self.children(with_directory).each と同じです。

self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

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

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us...

Pathname#each_child(with_directory = true) -> Enumerator (9961.0)

self.children(with_directory).each と同じです。

self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

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

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/us...

Pathname#children(with_directory = true) -> [Pathname] (9922.0)

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。

ただし、 ".", ".." は要素に含まれません。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
require 'pathname'
Pathname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>...

正規表現 (2161.0)

正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references

...= /\A
\d+ # 整数部
(\. # 小数点
\d+ # 小数部
)? # 小数点 + 小数部 はなくともよい
\z/x
float_pat.match("3.14") # => #<MatchData "3.14" 1:".14">
//}

空白を表現したい場合はエスケープをしてください。

//emlist[][ruby]{
/x y/x.match("x y") # => ni...

ruby 1.8.4 feature (1405.0)

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

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

掲載方針

*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリへの単なる定数の追加は収録しない。

以下は各変更点に付けるべきタグです。

記号について(特に重要なものは大文字(主観))

# * カテゴリ
# * [ruby]: ruby インタプリタの変更
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加され...

絞り込み条件を変える

Psych.safe_load(yaml, permitted_classes: [], permitted_symbols: [], aliases: false, filename: nil, fallback: nil, symbolize_names: false, freeze: false) -> object (919.0)

安全に YAML フォーマットの文書を読み込み Ruby のオブジェクトを生成して返します。

安全に YAML フォーマットの文書を読み込み Ruby のオブジェクトを生成して返します。

デフォルトでは以下のクラスのオブジェクトしか変換しません。

* TrueClass
* FalseClass
* NilClass
* Numeric
* String
* Array
* Hash

再帰的なデータ構造はデフォルトでは許可されていません。

任意のクラスを許可するにはキーワード引数 permitted_classes を指定すると、
そのクラスが追加されます。例えば Date クラスを許可するには
以下のように書いてください:

//emlist[permitte...

rdoc (721.0)

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という
ドキュメント生成のためのコマンドも含んでいます。

このパッケージは RDoc と Markup というふたつのコンポーネントを含
んでいます。 RDoc とは Ruby のソースファイルに対するドキュメントを生成
するアプリケーションです。 JavaDoc と同様に、ソースを解析し、クラス、モ
ジュール、メソッドの定義を抜き出してきます(include,require もです)。そ
してこれらの内容とその直前に書かれたコメントを併合し、ドキュメントを出
力します(現在は HTML しか出力できませんが、こ...

Module#ruby2_keywords(method_name, ...) -> nil (718.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...

IO.popen([env = {}, [cmdname, arg0], *args, execopt={}], mode = "r", opt={}) -> IO (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

IO.popen([env = {}, [cmdname, arg0], *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

絞り込み条件を変える

IO.popen([env = {}, cmdname, *args, execopt={}], mode = "r", opt={}) -> IO (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

IO.popen([env = {}, cmdname, *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

IO.popen(env = {}, [[cmdname, arg0], *args, execopt={}], mode = "r", opt={}) -> IO (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

IO.popen(env = {}, [[cmdname, arg0], *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

IO.popen(env = {}, [cmdname, *args, execopt={}], mode = "r", opt={}) -> IO (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

絞り込み条件を変える

IO.popen(env = {}, [cmdname, *args, execopt={}], mode = "r", opt={}) {|f| ... } -> object (655.0)

サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。

p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"

サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。

...

Psych.safe_load(yaml, legacy_permitted_classes=[], legacy_permitted_symbols=[], legacy_aliases=false, legacy_filename=nil) -> object (619.0)

安全に YAML フォーマットの文書を読み込み Ruby のオブジェクトを生成して返します。

安全に YAML フォーマットの文書を読み込み Ruby のオブジェクトを生成して返します。

デフォルトでは以下のクラスのオブジェクトしか変換しません。

* TrueClass
* FalseClass
* NilClass
* Numeric
* String
* Array
* Hash

再帰的なデータ構造はデフォルトでは許可されていません。

任意のクラスを許可するにはキーワード引数 permitted_classes を指定すると、
そのクラスが追加されます。例えば Date クラスを許可するには
以下のように書いてください:

//emlist[permitte...

パターンマッチ (487.0)

パターンマッチ * patterns * variable_binding * variable_pinning * matching_non_primitive_objects * guard_clauses * current_feature_status * pattern_syntax * some_undefined_behavior_examples

...by]{
case [1, 1]
in a, b unless b == a*2
"matched"
else
"not matched"
end
#=> "matched"
//}

===[a:current_feature_status] 機能の現状

Ruby 3.1 の時点では、Find パターンは 「実験的機能」 扱いです。Find パターンの構文は将来的に変更の可能性がありま...

CSV.new(data, options = Hash.new) -> CSV (463.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

このメソッドは CSV ファイルを読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。

ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用してください。
他の位置から処理したい場合はあらかじめそのように設定した StringIO を渡してください。

@param data String か IO のインスタンスを指定します。
String のインスタンスを指定した場合、CSV#string を使用して
後からデータを取り出すことが出来ます。...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (445.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

絞り込み条件を変える

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (445.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

Shellwords.#shelljoin(array) -> String (373.0)

配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。

配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に
使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。

個々の配列要素に対するエスケープには、Shellwords.#shellescape と
同じ規則が適用されます。

@param array エスケープ対象の文字列を要素とする配列を指定します。
@return エスケープ結果を連結した文字列を返します。

例:
require 'shellwords'

pattern = 'Jan 15'
file = 'file nam...

NEWS for Ruby 3.0.0 (361.0)

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

...r
* Update to Bundler 2.2.3
* CGI
* Update to 0.2.0
* This version is Ractor compatible.
* CSV
* Update to CSV 3.1.9
* Date
* Update to Date 3.1.1
* This version is Ractor compatible.
* Digest
* Update to Digest 3.0.0
* This version is Ractor compatible.
* E...

ruby 1.6 feature (343.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

ruby 1.6 feature
ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) -> stable-snapshot

: 2003-01-22: errno

EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていま...

NEWS for Ruby 2.5.0 (181.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.4.0 以降の変更

=== 言語仕様の変更

* トップレベルの定数参照を削除しました 11547
* do/end ブロック内部で rescue/else/ensure を書けるようになりました 12906
* 文字列の式展...

絞り込み条件を変える