ライブラリ
- ビルトイン (84)
- benchmark (120)
- resolv (12)
-
ripper
/ lexer (8)
クラス
-
Benchmark
:: Job (24) -
Benchmark
:: Report (24) -
Benchmark
:: Tms (36) - Module (12)
-
Resolv
:: DNS :: Name (12) - Ripper (8)
-
RubyVM
:: InstructionSequence (36) -
Thread
:: Backtrace :: Location (24)
モジュール
- Benchmark (36)
オブジェクト
- main (12)
キーワード
- FORMAT (24)
-
NEWS for Ruby 3
. 0 . 0 (5) -
base
_ label (24) - benchmark (12)
- bm (12)
-
cgi
/ session (12) - format (12)
- inspect (12)
- item (24)
- lex (8)
- new (24)
- report (24)
-
ruby 1
. 8 . 4 feature (12) - using (24)
- リテラル (11)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # label -> String (18131.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...ence:<compiled>@<compiled>>
iseq.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.label # => "<main>"......例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"
@see RubyVM::InstructionSequence#base_label... -
Thread
:: Backtrace :: Location # label -> String (18119.0) -
self が表すフレームのラベルを返します。通常、メソッド名、クラス名、モ ジュール名などで構成されます。
...フレームのラベルを返します。通常、メソッド名、クラス名、モ
ジュール名などで構成されます。
例: Thread::Backtrace::Location の例1を用いた例
//emlist[][ruby]{
loc = c(0..1).first
loc.label # => "a"
//}
@see Thread::Backtrace::Location#base_label... -
Thread
:: Backtrace :: Location # base _ label -> String (6141.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
...race::Location#label から修飾を取り除いたもので構成
されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end
# => init......ialize
# new
# <main>
//}
@see Thread::Backtrace::Location#label... -
RubyVM
:: InstructionSequence # base _ label -> String (6131.0) -
self が表す命令シーケンスの基本ラベルを返します。
...<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 # => "<m......ain>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"
@see RubyVM::InstructionSequence#label... -
ruby 1
. 8 . 4 feature (414.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...# => ruby 1.8.4 (2005-12-16) [i686-linux]
-:1: empty symbol literal
: Symbol [bug]
#Sat Oct 22 13:26:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check
# if valid as a symbol name more strictly. [r......puts :"@1".inspect
puts :"@@1".inspect
puts :"@".inspect
puts :"@@".inspect
# => ruby 1.8.3 (2005-09-21) [i686-linux]
:!
:=
:0
:$1
:@1
:@@1......k/canvas.rb, ext/tk/lib/tk/entry.rb,
# ext/tk/lib/tk/frame.rb, ext/tk/lib/tk/image.rb,
# ext/tk/lib/tk/itemconfig.rb, ext/tk/lib/tk/labelframe.rb,
# ext/tk/lib/tk/listbox.rb, ext/tk/lib/tk/menu.rb,
# ext/tk/lib/tk/radiobutton.rb, ext/tk/lib/tk/scale.rb,
# ext/... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (237.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...した場合は、
それらの数値も追加の行に表示されます。
@param caption レポートの一行目に表示する文字列を指定します。
@param label_width ラベルの幅を指定します。
@param fmtstr フォーマット文字列を指定します。......この引数を省略すると Benchmark::FORMAT が使用されます。
@param labels ブロックが Benchmark::Tms オブジェクトの配列を返す場合に指定します。
=== フォーマット文字列
フォーマット文字列として以下が使用できます。
: %u......経過時間で置き換えられます。Benchmark::Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label
//emlist[][ruby]{
require 'benchmark'
n = 50000
# これは
# Benchmark.bm(7, ">total:", ">avg:") do |x| ... end
# と同じ
Benchmark.bench... -
Benchmark
. # bm(label _ width = 0 , *labels) {|rep| . . . } -> [Benchmark :: Tms] (225.0) -
Benchmark.#benchmark メソッドの引数を簡略化したものです。
...ソッドの引数を簡略化したものです。
Benchmark.#benchmark メソッドと同様に働きます。
@param label_width ラベルの幅を指定します。
@param labels ブロックが Benchmark::Tms オブジェクトの配列を返す場合に指定します。
//emlist[][ruby......0.001467 0.004727 0.006194 ( 0.006193)
# times: 0.003814 0.000000 0.003814 ( 0.003814)
# upto: 0.003855 0.000003 0.003858 ( 0.003859)
# >total: 0.009136 0.004730 0.013866 ( 0.013867)
# >avg: 0.003045 0.001577 0.004622 ( 0.004622)
//}
@see Benchmark.#benchmark... -
Benchmark
:: Tms . new(utime = 0 . 0 , stime = 0 . 0 , cutime = 0 . 0 , cstime = 0 . 0 , real = 0 . 0 , label = nil) -> Benchmark :: Tms (143.0) -
新しい Benchmark::Tms オブジェクトを生成して返します。
...新しい Benchmark::Tms オブジェクトを生成して返します。
@param utime User CPU time
@param stime System CPU time
@param cutime 子プロセスの User CPU time
@param cstime 子プロセスの System CPU time
@param real 実経過時間
@param label ラベル... -
Resolv
:: DNS :: Name . new(labels , absolute = true) -> Resolv :: DNS :: Name (140.0) -
Resolv::DNS::Nameのインスタンスを生成します。 labels は Resolv::DNS::Label::Str の配列を与えます。
...を生成します。
labels は Resolv::DNS::Label::Str の配列を与えます。
@param labels ドメイン名を Resolv::DNS::Label::Str の配列として与えます。
@param absolute ドメイン名が絶対パスであるかどうかを 真偽値で与えます。
@see Resolv::DNS::Name....