るりまサーチ

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

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Regexp#options -> Integer (32257.0)

正規表現の生成時に指定されたオプションを返します。戻り値は、 Regexp::EXTENDED, Regexp::IGNORECASE, Regexp::MULTILINE, Regexp::FIXEDENCODING, Regexp::NOENCODING, の論理和です。

...規表現の生成時に指定されたオプションを返します。戻り値は、
Regexp::EXTENDED, Regexp::IGNORECASE,
Regexp::MULTILINE,
Regexp::FIXEDENCODING,
Regexp::NOENCODING,
の論理和です。

これで得られるオプションには生成時に指定したもの以外の
オプ...
...emlist[例][ruby]{
p Regexp::IGNORECASE # => 1
p //i.options # => 1

p Regexp.new("foo", Regexp::IGNORECASE ).options # => 1
p Regexp.new("foo", Regexp::EXTENDED).options # => 2
p Regexp.new("foo", Regexp::IGNORECASE | Regexp::EXTENDED).options # => 3
p Regexp.new("foo", Regexp::MULTILINE)...
....options # => 4
p Regexp.new("foo", Regexp::IGNORECASE | Regexp::MULTILINE ).options # => 5
p Regexp.new("foo", Regexp::MULTILINE | Regexp::EXTENDED).options # =>6
p Regexp.new("foo", Regexp::IGNORECASE | Regexp::MULTILINE | Regexp::EXTENDED).options # => 7
//}...

RubyVM::InstructionSequence.compile_file(file, options = nil) -> RubyVM::InstructionSequence (17509.0)

引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。

...file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。

RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。

@param file...
...ル名を文字列で指定します。

@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください...
...

# /tmp/hello.rb
puts "Hello, world!"

# irb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>

@see RubyVM::InstructionSequence.compile...

RubyVM::InstructionSequence.compile(source, file = nil, path = nil, line = 1, options = nil) -> RubyVM::InstructionSequence (14610.0)

引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。

...にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。

@param source Ruby のソースコードを文字列で指定します。

@param file ファイル名を文字列で指定します。

@param path 引数 file の絶対パスファイル名を...
...

@param line 引数 source の 1 行目の行番号を指定します。

@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参...
...
してください。

RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>

@see RubyVM::InstructionSequence.compile_file...

ARGF.class#set_encoding(ext_enc, int_enc, options = {}) -> self (14310.0)

ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。

...詳しくは IO#set_encoding を参照してください。

@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで
区切って指定します。
@param ext_enc 外部エンコーディングを表す文字列か
Encoding オブジェ...
...ます。
@param int_enc 内部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@param options エンコーディング変換のオプション。
String#encode と同じものが指定できます。

@see String#encode...

RubyVM::InstructionSequence.compile_option=(options) (14225.0)

命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数 options で指定します。

...令シーケンスのコンパイル時のデフォルトの最適化オプションを引数
options
で指定します。

@param options コンパイル時の最適化オプションを true、false、nil、
Hash のいずれかで指定します。true を指定した場合は...
...nil を指定した場合はいずれ
のオプションも変更しません。また、Hash を指定した
場合は以下のキーに対して、true か false を指定する事で個
別に有効、無効を指定します。
//emlist{
* :inline_c...
...instructions_unification
* :operands_unification
* :peephole_optimization
* :specialized_instruction
* :stack_caching
* :tailcall_optimization
* :trace_instruction
//}
:debug_level をキーに指定した場合は値を数値で指定します。

.new、.compile、.compi...

絞り込み条件を変える

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, options) -> Symbol (14215.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...oding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize...
...@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options
には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion aft...
... input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :fi...

ARGF.class#set_encoding(enc_str, options = {}) -> self (14210.0)

ARGF の外部/内部エンコーディングを設定します。 次以降に処理するファイルにも同じ設定が適用されます。

...詳しくは IO#set_encoding を参照してください。

@param enc_str 外部/内部エンコーディングを"A:B" のようにコロンで
区切って指定します。
@param ext_enc 外部エンコーディングを表す文字列か
Encoding オブジェ...
...ます。
@param int_enc 内部エンコーディングを表す文字列か
Encoding オブジェクトを指定します。
@param options エンコーディング変換のオプション。
String#encode と同じものが指定できます。

@see String#encode...

String#capitalize!(*options) -> self | nil (14209.0)

文字列先頭の文字を大文字に、残りを小文字に破壊的に変更します。

...す。

@param options オプションの詳細は String#downcase を参照してください。

@return capitalize! は self を変更して返しますが、
変更が起こらなかった場合は nil を返します。

//emlist[例][ruby]{
str = "foobar"
str.capitalize!
p str # => "...
...Foobar"

str = "fooBAR"
str.capitalize!
p str # => "Foobar"
//}

@see String#capitalize, String#upcase!,
String#downcase!, String#swapcase!...

String#capitalize(*options) -> String (14209.0)

文字列先頭の文字を大文字に、残りを小文字に変更した文字列を返します。

...@param options オプションの詳細は String#downcase を参照してください。

//emlist[例][ruby]{
p "foobar--".capitalize # => "Foobar--"
p "fooBAR--".capitalize # => "Foobar--"
p "FOOBAR--".capitalize # => "Foobar--"
//}

@see String#capitalize!, String#upcase,
String#down...
...case, String#swapcase...

Symbol#capitalize(*options) -> Symbol (14203.0)

シンボルに対応する文字列の先頭の文字を大文字に、残りを小文字に変更した シンボルを返します。

...に、残りを小文字に変更した
シンボルを返します。

(self.to_s.capitalize.intern と同じです。)

:foobar.capitalize #=> :Foobar
:fooBar.capitalize #=> :Foobar
:FOOBAR.capitalize #=> :Foobar
:"foobar--".capitalize # => "Foobar--"

@see String#capitalize...

絞り込み条件を変える

<< 1 2 3 ... > >>