別のキーワード
ライブラリ
- ビルトイン (1030)
- bigdecimal (65)
- coverage (15)
- csv (84)
- erb (12)
- fiber (8)
- fiddle (12)
- json (24)
- logger (9)
- matrix (52)
-
net
/ http (24) - openssl (156)
- optparse (24)
- pathname (24)
- pp (36)
- prettyprint (12)
- psych (174)
- rake (84)
- rbconfig (24)
-
rdoc
/ parser / ruby (12) -
rexml
/ document (48) -
ripper
/ lexer (12) -
ripper
/ sexp (24) - rubygems (12)
-
rubygems
/ defaults (12) -
rubygems
/ requirement (12) -
rubygems
/ version (8) - socket (36)
- stringio (12)
-
syslog
/ logger (12) - tsort (93)
- uri (62)
-
webrick
/ ssl (12) - win32ole (36)
クラス
- Array (48)
- BigDecimal (65)
- CSV (72)
-
CSV
:: Table (12) - Class (24)
- Coverage (15)
- Data (6)
- Dir (114)
- ERB (12)
- Encoding (12)
- Enumerator (19)
-
Enumerator
:: Lazy (12) - Fiber (36)
-
Fiddle
:: Closure :: BlockCaller (12) - File (134)
-
Gem
:: Requirement (12) -
Gem
:: Version (8) - Hash (42)
- IO (72)
- Integer (4)
- Logger (9)
- Matrix (40)
- Module (24)
-
Net
:: HTTP (12) -
Net
:: HTTPResponse (12) - Object (24)
-
OpenSSL
:: ASN1 :: BMPString (24) -
OpenSSL
:: ASN1 :: BitString (24) -
OpenSSL
:: ASN1 :: Boolean (24) -
OpenSSL
:: ASN1 :: Enumerated (24) -
OpenSSL
:: ASN1 :: PrintableString (24) -
OpenSSL
:: BN (36) - OptionParser (24)
- PP (36)
- Pathname (24)
- PrettyPrint (12)
-
Psych
:: Visitors :: YAMLTree (12) -
RDoc
:: Parser :: Ruby (12) -
REXML
:: Entity (12) -
REXML
:: XPath (36) -
Rake
:: InvocationChain (24) - Random (7)
- Regexp (48)
- Ripper (36)
- RubyVM (1)
-
RubyVM
:: InstructionSequence (116) - SignalException (24)
- Socket (24)
- String (21)
- StringIO (12)
- Struct (28)
- Symbol (12)
-
Syslog
:: Logger (12) - SystemCallError (12)
- TCPSocket (12)
- Thread (60)
-
Thread
:: Queue (8) - TracePoint (24)
- Vector (12)
-
WEBrick
:: GenericServer (12) -
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (24)
モジュール
- GC (48)
- Gem (12)
-
Gem
:: QuickLoader (12) - JSON (24)
- Psych (150)
- Rake (24)
- RakeFileUtils (36)
- RbConfig (24)
-
RubyVM
:: AbstractSyntaxTree (30) -
RubyVM
:: MJIT (21) - TSort (93)
- URI (62)
オブジェクト
- ENV (19)
キーワード
- === (12)
- DEBUG (12)
- DEBUG= (12)
- [] (48)
-
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) -
absolute
_ path (12) -
absolute
_ path? (6) -
all
_ symbols (12) - append (12)
- application (12)
- application= (12)
- basename (12)
- basis (12)
- binread (12)
- binwrite (12)
- birthtime (11)
-
body
_ permitted? (12) - build (24)
- bytes (7)
- chdir (24)
- clone (12)
- combine (16)
- compatible? (12)
- compile (12)
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) - constants (12)
- correct? (8)
-
create
_ id (12) - current (12)
-
decode
_ www _ form _ component (12) - define (3)
- disable (12)
- disasm (12)
- disassemble (12)
-
double
_ fig (12) - dump (24)
-
dump
_ stream (12) - each (12)
-
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - empty? (9)
- enable (12)
- enabled? (7)
- encode (7)
-
encode
_ www _ form _ component (12) - escape (7)
- exist? (12)
- exists? (18)
- first (12)
- fnmatch (12)
- fnmatch? (12)
-
for
_ fd (12) - format (12)
- gethostbyname (24)
- glob (48)
- instance (12)
- join (24)
-
keyword
_ init? (4) -
last
_ match (24) -
latest
_ gc _ info (12) - lex (12)
- limit (12)
-
line
_ stub (7) - load (15)
-
load
_ documents (8) -
load
_ file (12) -
load
_ from _ binary (10) -
load
_ from _ binary _ extra _ data (10) -
load
_ full _ rubygems _ library (12) -
load
_ stream (24) - match (12)
- matches? (12)
- members (15)
- mode (24)
- new (501)
-
nowrite
_ flag (12) - of (22)
-
ole
_ classes (12) - open (96)
- parse (46)
-
parse
_ file (10) -
parse
_ stream (24) - pause (7)
- pp (12)
- read (12)
- readlines (12)
- realpath (12)
-
resolve
_ feature _ path (1) - resume (7)
-
ruby2
_ keywords _ hash? (6) -
ruby
_ engine (12) - running? (8)
-
safe
_ load (19) - sexp (12)
-
sexp
_ raw (12) -
sharing
_ detection (12) -
sharing
_ detection= (12) - start (12)
- stat (12)
- stop (12)
-
strongly
_ connected _ components (12) - table (12)
- tcp (12)
-
to
_ h (7) - trace (12)
-
try
_ convert (52) - tsort (12)
-
tsort
_ each (23) - typelibs (12)
- union (12)
-
used
_ modules (12) - ver (5)
-
verbose
_ flag (12) -
verbose
_ flag= (12) -
world
_ readable? (12) -
world
_ writable? (12) -
yaml
_ tag (12) - yield (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (6207.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 body で指定した Proc、Method オブジェクトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::In......# => <RubyVM::InstructionSequence:block in irb_binding@(irb)>
# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/iseq_of.rb
def......obal_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_global_proc)
> # => #<Ruby... -
Thread
. abort _ on _ exception -> bool (6207.0) -
真の時は、いずれかのスレッドが例外によって終了した時に、インタプリタ 全体を中断させます。false の場合、あるスレッドで起こった例外は、Thread#join などで検出されない限りそのスレッドだけをなにも警告を出さずに終了させます。
...@param newstate スレッド実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
Thread.abort_on_exception # => false
Thread.abort_on_exception = true
Thread.abort_on_exception # => true
//}......。
@param newstate スレッド実行中に例外発生した場合、インタプリタ全体を終了させるかどうかを true か false で指定します。
//emlist[例][ruby]{
Thread.abort_on_exception # => false
Thread.abort_on_exception = true
Thread.abort_on_exception # => true
//}... -
RDoc
:: Parser :: Ruby . new(top _ level , file _ name , body , options , stats) -> RDoc :: Parser :: Ruby (6202.0) -
自身を初期化します。
...@param top_level RDoc::TopLevel オブジェクトを指定します。
@param file_name ファイル名を文字列で指定します。
@param body ソースコードの内容を文字列で指定します。
@param options RDoc::Options オブジェクトを指定します。
@param stats R... -
File
. basename(filename , suffix = "") -> String (6191.0) -
filename の一番後ろのスラッシュに続く要素を返します。もし、 引数 suffix が与えられて、かつそれが filename の末尾に 一致するなら、それを取り除いたものを返します。
...[ruby]{
p File.basename("ruby/ruby.c") #=> "ruby.c"
p File.basename("ruby/ruby.c", ".c") #=> "ruby"
p File.basename("ruby/ruby.c", ".*") #=> "ruby"
p File.basename("ruby/ruby.exe", ".*") #=> "ruby"
p File.basename("ruby/y.tab.c", ".*") #=> "y.tab"
//}
File.basename の動作は ba......sename(3)
に従います。
//emlist[例][ruby]{
p File.basename("foo/bar/") # => "bar"
//}
@param filename ファイル名を表す文字列を指定します。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカ... -
BigDecimal
. double _ fig -> Integer (6123.0) -
Ruby の Float クラスが保持できる有効数字の数を返します。
...
Ruby の Float クラスが保持できる有効数字の数を返します。
//emlist[][ruby]{
require 'bigdecimal'
p BigDecimal::double_fig # ==> 16 (depends on the CPU etc.)
//}
double_figは以下の C プログラムの結果と同じです。
double v = 1.0;
int double_fig = 0;......while (v + 1.0 > 1.0) {
++double_fig;
v /= 10;
}... -
Encoding
. compatible?(obj1 , obj2) -> Encoding | nil (6119.0) -
2つのオブジェクトのエンコーディングに関する互換性をチェックします。 互換性がある場合はそのエンコーディングを、 ない場合は nil を返します。
...文字列が取るであろう Encoding オブジェクトを返します。
//emlist[例][ruby]{
Encoding.compatible?("\xa1".force_encoding("iso-8859-1"), "b")
#=> #<Encoding:ISO-8859-1>
Encoding.compatible?(
"\xa1".force_encoding("iso-8859-1"),
"\xa1\xa1".force_encoding("euc-jp"))
#=> nil
//......ることができます。
//emlist[例][ruby]{
Encoding.compatible?(Encoding::UTF_8, Encoding::CP932)
# => nil
Encoding.compatible?(Encoding::UTF_8, Encoding::US_ASCII)
# => #<Encoding:UTF-8>
//}
@param obj1 チェック対象のオブジェクト
@param obj2 チェック対象のオブジェク... -
Matrix
. combine(*matrices) -> Enumerator (6119.0) -
要素ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。
...ックを呼び出した結果を組み合わせた Matrix を返します。
//emlist[例][ruby]{
require 'matrix'
x = Matrix[[6, 6], [4, 4]]
y = Matrix[[1, 2], [3, 4]]
Matrix.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]]
//}
@param matrices 並べる行列。すべての行列の行......数と列数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します
@see Matrix#combine... -
Matrix
. combine(*matrices) {|*elements| . . . } -> Matrix (6119.0) -
要素ごとにブロックを呼び出した結果を組み合わせた Matrix を返します。
...ックを呼び出した結果を組み合わせた Matrix を返します。
//emlist[例][ruby]{
require 'matrix'
x = Matrix[[6, 6], [4, 4]]
y = Matrix[[1, 2], [3, 4]]
Matrix.combine(x, y) {|a, b| a - b} # => Matrix[[5, 4], [1, 0]]
//}
@param matrices 並べる行列。すべての行列の行......数と列数が一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行や列の要素数が一致しない時に発生します
@see Matrix#combine... -
Coverage
. line _ stub(file) -> Array (6113.0) -
行カバレッジの配列のスタブを返します。
...ます。
//emlist[foo.rb][ruby]{
s = 0
10.times do |x|
s += x
end
if s == 45
p :ok
else
p :ng
end
//}
このファイルに対して line_stub を実行すると、次のようになります。
//emlist[][ruby]{
require "coverage"
p Coverage.line_stub("foo.rb") #=> [0, 0, 0, nil, nil, 0... -
TCPSocket
. gethostbyname(host) -> Array (6113.0) -
ホスト名または IP アドレス (整数または"127.0.0.1" のような文字列)からホストの情報を返します。ホスト情報は、ホ スト名、ホストの別名の配列、ホストのアドレスタイプ、ホストの アドレスを各要素とする配列です。ホストのアドレスは octet decimal の文字列 ("127.0.0.1"のような文字列) や IPv6 アドレス ("::1" のような文字列) です。
...。
@return ホスト名、ホストの別名の配列、ホストのアドレスタイプ、ホストのアドレスを各要素とする配列を返します。
例:
require 'socket'
p TCPSocket.gethostbyname("www.ruby-lang.org")
#=> ["beryllium.ruby-lang.org", [], 2, "210.163.138.100"]...