るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

RubyVM::InstructionSequence#base_label -> String (26119.0)

self が表す命令シーケンスの基本ラベルを返します。

...iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end


# irb...
...> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end


Ruby
VM::InstructionSequence.of(method(:hello)).base_label
# => "hello"

@
see RubyVM::InstructionSequence#label...

RubyVM::InstructionSequence#label -> String (26119.0)

self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。

... RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end


# irb
> iseq = Ruby...
...VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end


Ruby
VM::InstructionSequence.of(method(:hello)).label
# => "hello"

@
see RubyVM::InstructionSequence#base_label...

RubyVM::InstructionSequence#absolute_path -> String | nil (26113.0)

self が表す命令シーケンスの絶対パスを返します。

...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end


# irb
> iseq = Ruby...
...VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"

@
see RubyVM::InstructionSequence#path...

RubyVM::InstructionSequence#path -> String (26113.0)

self が表す命令シーケンスの相対パスを返します。

...= RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end


# irb
> iseq = Ruby...
...VM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"

@
see RubyVM::InstructionSequence#absolute_path...

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

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

...

@
param n 部分文字列を指定する数値。

@
raise 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': i...
...ndex 4 out of matches (IndexError)
//}

@
see MatchData#begin...

絞り込み条件を変える

Range#end -> object (18227.0)

終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま せん。

...終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま
せん。

//emlist[例][ruby]{
(10..20).last # => 20
(10...20).last # => 20
//}

@
see Range#begin...

Gem::Specification#add_dependency(gem, *requirements) -> [Gem::Dependency] (6337.0)

この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。

...します。

//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}

@
param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。

@
param requirements バー...
...ジョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。

@
see Gem::Specification#add_development_dependency, Gem::Dependency...

Gem::Specification#add_runtime_dependency(gem, *requirements) -> [Gem::Dependency] (6337.0)

この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。

...します。

//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}

@
param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。

@
param requirements バー...
...ジョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。

@
see Gem::Specification#add_development_dependency, Gem::Dependency...

Gem::Specification#add_development_dependency(gem, *requirements) -> [Gem::Dependency] (6331.0)

この gem の DEVELOPMENT 依存性を追加します。 この gem の開発時に必要となる gem を指定します。

...

//emlist[][ruby]{
gem "rack", "~> 1.6", ">= 1.6.12"
//}

@
param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。

@
param requirements バージョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。

@
see Gem::Specifi...
...cation#add_runtime_dependency, Gem::Dependency...
<< 1 2 3 ... > >>