クラス
- BasicObject (12)
-
Psych
:: Handler (12) -
Psych
:: Nodes :: Scalar (24) - Regexp (12)
-
RubyVM
:: InstructionSequence (12) - String (23)
- Struct (4)
モジュール
- Kernel (22)
キーワード
- +@ (10)
- -@ (10)
- Hash (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) - Regexp (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Rubyの起動 (12)
- Ruby用語集 (12)
- [] (1)
-
_ _ id _ _ (12) - ` (12)
-
compile
_ option (12) - dedup (3)
- lambda (5)
-
literal
_ append (12) -
literal
_ concat (12) -
literal
_ concat _ dstr (12) -
literal
_ concat _ list (12) -
literal
_ concat _ string (12) - new (15)
- proc (5)
-
ruby 1
. 8 . 4 feature (12) - scalar (12)
- uri (12)
- ~ (12)
- オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (12)
- クラス/メソッドの定義 (12)
- パターンマッチ (12)
- プログラム・文・式 (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- リテラル (12)
- 多言語化 (12)
- 正規表現 (12)
検索結果
先頭5件
-
Hash (6.0)
-
ハッシュテーブル(連想配列とも呼ぶ)のクラスです。ハッシュは任意の種類のオブ ジェクト(キー)から任意の種類のオブジェクト(値)への関連づけを行うことができます。
...ジェクト(値)への関連づけを行うことができます。
ハッシュ生成は多くの場合以下のようなリテラル (d:spec/literal#hash) で行われます。
{a => b, ... } # aはキー、bは値となる
{s: b , ... } # { :s => b, ... } と同じ。キーがシン... -
Kernel
. # `(command) -> String (6.0) -
command を外部コマンドとして実行し、その標準出力を文字列として 返します。このメソッドは `command` の形式で呼ばれます。
...けなら
Kernel.#system を使います。特に端末を制御するコマンドでは
`command` は失敗するかもしれません。
d:spec/literal#command も参照。
@param command コマンドとして実行する引数です。そのまま評価されるのではなく、
ダブ... -
Kernel
. # lambda { . . . } -> Proc (6.0) -
与えられたブロックから手続きオブジェクト (Proc のインスタンス) を生成して返します。Proc.new に近い働きをします。
...要があります。
& 引数を渡した lambda は Warning[:deprecated] = true のときに警告メッセージ
「warning: lambda without a literal block is deprecated; use the proc without lambda instead」
を出力します。
@raise ArgumentError ブロックを省略した呼び出しを... -
Kernel
. # proc { . . . } -> Proc (6.0) -
与えられたブロックから手続きオブジェクト (Proc のインスタンス) を生成して返します。Proc.new に近い働きをします。
...要があります。
& 引数を渡した lambda は Warning[:deprecated] = true のときに警告メッセージ
「warning: lambda without a literal block is deprecated; use the proc without lambda instead」
を出力します。
@raise ArgumentError ブロックを省略した呼び出しを... -
NEWS for Ruby 2
. 1 . 0 (6.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...与えずにプロセス名をセットできます。
* 追加: Process.#clock_gettime
* 追加: Process.#clock_getres
* String
* "literal".freeze は同じオブジェクトを返すように最適化されました。
* 追加: String#scrub, String#scrub! 不正なバイト列... -
NEWS for Ruby 2
. 4 . 0 (6.0) -
NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...装の詳細ですが以下の通りです:
* 配列リテラルに splat が含まれないこと
* must have at least one expression but literal
* 配列の長さが0x100(256)以下であること
* Array#max や Array#min が再定義されていないこと
* スレッドの... -
Psych
:: Handler # scalar(value , anchor , tag , plain , quoted , style) -> () (6.0) -
スカラー値を見付けたときに呼び出されます。
...す。
* Psych::Nodes::Scalar::PLAIN
* Psych::Nodes::Scalar::SINGLE_QUOTED
* Psych::Nodes::Scalar::DOUBLE_QUOTED
* Psych::Nodes::Scalar::LITERAL
* Psych::Nodes::Scalar::FOLDED
必要に応じてこのメソッドを override してください。
@param value スカラー値
@param ancho... -
Psych
:: Nodes :: Scalar . new(value , anchor=nil , tag=nil , plain=true , quoted=false , style=ANY) -> Psych :: Nodes:Scalar (6.0) -
Scalar オブジェクトを生成します。
...lar::ANY
* Psych::Nodes::Scalar::PLAIN
* Psych::Nodes::Scalar::SINGLE_QUOTED
* Psych::Nodes::Scalar::DOUBLE_QUOTED
* Psych::Nodes::Scalar::LITERAL
* Psych::Nodes::Scalar::FOLDED
@param value スカラー値
@param anchor 関連付けられた anchor の名前
@param tag タグ名
@param p... -
Regexp (6.0)
-
正規表現のクラス。正規表現のリテラルはスラッシュで囲んだ形式 で記述します。
...現オブジェクトを動的に生成する
こともできます。
//emlist[][ruby]{
str = "this is regexp"
rp1 = Regexp.new("^this is regexp")
p rp1 =~ str # => 0
p Regexp.last_match[0] # => "this is regexp"
//}
spec/regexp や d:spec/literal#regexp も参照してください。......"this is regexp"
//}
Ruby 3.0.0 から正規表現リテラルは freeze されるようになりました。
//emlist[][ruby]{
p /abc/.frozen?
# => true
p /a#{42}bc/.frozen?
# => true
p Regexp.new('abc').frozen?
# => false
//}
spec/regexp や d:spec/literal#regexp も参照してください。... -
Regexp
# ~ -> Integer | nil (6.0) -
変数 $_ の値との間でのマッチをとります。
...list[例][ruby]{
$_ = "hogehoge"
if /foo/
puts "match"
else
puts "no match"
end
# => no match
# ただし、警告がでる。warning: regex literal in condition
reg = Regexp.compile("foo")
if ~ reg
puts "match"
else
puts "no match"
end
# => no match
if reg
puts "match"
else
puts... -
Rubyの起動 (6.0)
-
Rubyの起動 * cmd_option * shebang
...: enabled)
* did_you_mean did_you_mean (default: enabled)
* rubyopt RUBYOPT 環境変数 (default: enabled)
* frozen-string-literal 全ての文字列リテラルをfreeze (default: disabled)
//}
: --disable
指定した feature(--enable を参照)を無効にします。......: enabled)
* did_you_mean did_you_mean (default: enabled)
* rubyopt RUBYOPT 環境変数 (default: enabled)
* frozen-string-literal 全ての文字列リテラルをfreeze (default: disabled)
* jit JIT (default: disabled)
//}
: --disable
指定した featur......: enabled)
* did_you_mean did_you_mean (default: enabled)
* rubyopt RUBYOPT 環境変数 (default: enabled)
* frozen-string-literal 全ての文字列リテラルをfreeze (default: disabled)
* jit JIT (default: disabled)
* mjit MJIT (default: di...