別のキーワード
種類
- インスタンスメソッド (66)
- 文書 (45)
- ライブラリ (11)
- モジュール関数 (11)
- 特異メソッド (7)
ライブラリ
- ビルトイン (66)
- benchmark (11)
-
ripper
/ lexer (7)
クラス
- Ripper (7)
-
RubyVM
:: InstructionSequence (44) -
Thread
:: Backtrace :: Location (22)
モジュール
- Benchmark (11)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 3
. 0 . 0 (4) -
base
_ label (22) - benchmark (11)
-
cgi
/ session (11) - inspect (11)
- lex (7)
-
ruby 1
. 8 . 4 feature (11) -
to
_ a (11)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # label -> String (21125.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...ctionSequence.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 = RubyVM::Instruction......Sequence.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 (21113.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 (9129.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
...ktrace::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
# => in......itialize
# new
# <main>
//}
@see Thread::Backtrace::Location#label... -
RubyVM
:: InstructionSequence # base _ label -> String (9125.0) -
self が表す命令シーケンスの基本ラベルを返します。
...します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def h......# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"
@see RubyVM::InstructionSequence#label... -
cgi
/ session (6012.0) -
CGI のセッション管理を行うライブラリ。
...ession を使用した方がよりわかりやすいでしょう。
セッション情報は Hash ライクなインターフェースです。
セッションはセッション ID とプログラムが記録した
セッション情報から構成されます。
デフォルトでは CGI::Session:......:FileStore が使用され、
記録できるのは文字列のみです。
セッション情報は CGI::Session::FileStore か
CGI::Session::PStore を使用した場合は
サーバのローカルファイルに記録され、
次回のリクエスト時に利用されます。
デフォルト......NV['SCRIPT_NAME'])}">[戻る]</a></p>
</body></html>
END
}
end
end
SessionDemo.new
=== 参考URL
* http://www.shugo.net/article/webdb2/#label:13
* http://www.modruby.net/doc/faq.ja.jis.html#label-13
* http://www.ruby-doc.org/stdlib/libdoc/cgi/rdoc/index.html... -
RubyVM
:: InstructionSequence # inspect -> String (3006.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # to _ a -> Array (3006.0) -
self の情報を 14 要素の配列にして返します。
...す。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイナーバージョン。
: format_type
データ......:local_size: ローカル変数の総数 + 1。
:stack_max: スタックの深さ。(SystemStackError を検出するために使用)
: #label
メソッド名、クラス名、モジュール名などで構成される命令シーケンスのラ
ベル。トップレベルでは "<ma......引数の指定が必須のメソッド、ブロックの引数の個数。あるいは以下のよう
な配列。
[required_argc, [optional_arg_labels, ...],
splat_index, post_splat_argc, post_splat_index,
block_index, simple]
より詳細な情報については、vm_core.h... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (313.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...の配列を返した場合は、
それらの数値も追加の行に表示されます。
@param caption レポートの一行目に表示する文字列を指定します。
@param label_width ラベルの幅を指定します。
@param fmtstr フォーマット文字列を指定しま......す。
この引数を省略すると Benchmark::FORMAT が使用されます。
@param labels ブロックが Benchmark::Tms オブジェクトの配列を返す場合に指定します。
=== フォーマット文字列
フォーマット文字列として以下が使用で......えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label
//emlist[][ruby]{
require 'benchmark'
n = 50000
# これは
# Benchmark.bm(7, ">total:", ">avg:") do |x| ... end
# と同じ
Benchmark.benchmark(" "*7 + Benchmark::CAPTION,
7,
Benchmark::FOR... -
NEWS for Ruby 2
. 0 . 0 (114.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...警告しなくなりました
=== 組み込みクラスの更新
* ARGF.class
* 追加: ARGF.class#codepoints, ARGF.class#each_codepoint
IO にある同名のメソッドに対応します
* Array
* 追加: Array#bsearch 二分探索します
* 非互換:
* Array#shuf......に似ています
* 拡張: Hash#default_proc= default proc をクリアするために nil を渡せるようになりました
* IO
* 非推奨: IO#lines, #bytes, #chars, #codepoints
* Kernel
* 追加: Kernel.#Hash という変換メソッド。Kernel.#Array, Kernel.#Float に......nstructionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#base_label,
RubyVM::InstructionSeque... -
NEWS for Ruby 2
. 3 . 0 (108.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...うとして RuntimeError が発生したときにそのオブジェクトが生成された位置を表示します。
11725
* safe navigation operator (ぼっち演算子):
* object&.foo という形式のメソッド呼び出し形式が追加されました。これは object が ni......キュメントが追加されました
9098
=== 組み込みクラスの更新
* ARGF
* ARGF.read_nonblock は IO#read_nonblock と同じように `exception: false' オプションをサポートします
11358
* Array
* Array#bsearch_index を追加
10730
* Ar......* RubyGems 2.5.1 に更新しました。
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+2015-12-10
=== 組込みのグローバル変数の互換性に影響のある変更
* $S...