るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. range end

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

RubyVM::InstructionSequence.of(body) -> RubyVM::InstructionSequence (18149.0)

引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。

...

# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_binding@(irb)>

# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>

例2: Ruby...
...o, world"
end


$a_global_proc = proc { str = 'a' + 'b' }

# irb
> require '/tmp/iseq_of.rb'

# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>

# グローバル proc
> RubyVM::InstructionSequence.of($a_glob...

MatchData#end(n) -> Integer | nil (18143.0)

n 番目の部分文字列終端のオフセットを返します。

...IndexError 範囲外の n を指定した場合に発生します。

//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # => 6
p $~.end(3) # => nil
p $~.end(4) # => `end': index 4 out of matches (IndexError)
//}

@see MatchData#begin...

RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node (18120.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...

RubyVM::AbstractSyntaxTree.of(proc, keep_script_lines: false, error_tolerant: false, keep_tokens: false) -> RubyVM::AbstractSyntaxTree::Node (18120.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...

RubyVM::AbstractSyntaxTree.of(proc) -> RubyVM::AbstractSyntaxTree::Node (18119.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...

絞り込み条件を変える

Gem::EndOfYAMLException (12000.0)

YAML データが不正である場合に使用する例外です。

YAML データが不正である場合に使用する例外です。

Object#instance_of?(klass) -> bool (6143.0)

オブジェクトがクラス klass の直接のインスタンスである時真を返します。

...obj.instance_of?(c) が成立する時には、常に obj.kind_of?(c) も成立します。

@param klass Classかそのサブクラスのインスタンスです。

//emlist[][ruby]{
class C < Object
end

class S < C
end


obj = S.new
p obj.instance_of?(S) # true
p obj.instance_of?(C) #...
...false
//}

@see Object#kind_of?,Object#class...

Symbol#end_with?(*suffixes) -> bool (6137.0)

self の末尾が suffixes のいずれかであるとき true を返します。

...

(self.to_s.end_with?と同じです。)

@param suffixes パターンを表す文字列 (のリスト)

@see Symbol#start_with?

@see String#end_with?

//emlist[][ruby]{
:hello.end_with?("ello") #=> true

# returns true if one of the +suffixes+ matches.
:hello.end_with?("heaven",...
..."ello") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}...

IRB::InputMethod#readable_atfer_eof? -> false (6132.0)

入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。

...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。...

IRB::ReadlineInputMethod#eof? -> bool (6132.0)

入力が EOF(End Of File)に達したかどうかを返します。

...入力が EOF(End Of File)に達したかどうかを返します。...

絞り込み条件を変える

IRB::ReadlineInputMethod#readable_atfer_eof? -> false (6132.0)

入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。

...入力が EOF(End Of File)に達した後も読み込みが行えるかどうかを返します。...
<< 1 2 3 ... > >>