ライブラリ
- ビルトイン (225)
-
irb
/ ext / use-loader (24) -
net
/ http (12) - optparse (24)
- pathname (12)
- psych (12)
- shell (36)
-
shell
/ command-processor (12) -
shell
/ filter (12) -
syslog
/ logger (84)
クラス
- Array (21)
- Bignum (3)
- Class (12)
- Fixnum (3)
- Integer (48)
- Method (24)
- Module (12)
-
Net
:: HTTP (12) - Object (12)
- OptionParser (24)
- Pathname (12)
- Proc (30)
-
Psych
:: Handler (12) - Shell (36)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - String (24)
- Symbol (12)
-
Syslog
:: Logger (84) - TrueClass (12)
- UnboundMethod (12)
モジュール
キーワード
- [] (24)
- add (12)
- allbits? (8)
- anybits? (8)
- arity (24)
- cd (6)
- chdir (6)
- debug (12)
- error (12)
- fatal (12)
- foreach (18)
- info (12)
- initialize (12)
-
irb
_ load (12) -
irb
_ require (12) - lambda? (12)
- new (12)
- nobits? (8)
-
on
_ head (12) -
on
_ tail (12) - open (12)
- out (18)
- pack (21)
- parameters (24)
- post (12)
- pushd (6)
- pushdir (6)
-
ruby2
_ keywords (18) -
start
_ sequence (12) - sum (12)
-
to
_ proc (12) - unknown (12)
- unpack (12)
- warn (12)
検索結果
先頭5件
-
Bignum
# &(other) -> Fixnum | Bignum (21313.0) -
ビット二項演算子。論理積を計算します。
...ビット二項演算子。論理積を計算します。
@param other 数値
1 & 1 #=> 1
2 & 3 #=> 2... -
TrueClass
# &(other) -> bool (18343.0) -
other が真なら true を, 偽なら false を返します。
...。
& は再定義可能な演算子に分類されていますので、通常は true & other のように使われます。
//emlist[例][ruby]{
p true & true #=> true
p true & false #=> false
p true & nil #=> false
p true & (1 == 1) #=> true
p true & (1 + 1) #=> true
p true.&(true......) #=> true
p true.&(false) #=> false
p true.&(nil) #=> false
p true.&(1 == 1) #=> true
p true.&(1 + 1) #=> true
//}... -
Fixnum
# &(other) -> Fixnum | Bignum (18313.0) -
ビット二項演算子。論理積を計算します。
...ビット二項演算子。論理積を計算します。
@param other 数値
1 & 1 #=> 1
2 & 3 #=> 2... -
IRB
:: ExtendCommandBundle # irb _ load(*opts , &b) -> nil (6303.0) -
現在の irb に関する IRB::Context に対して irb_load コマンドを実行 します。
...現在の irb に関する IRB::Context に対して irb_load コマンドを実行
します。
@see IRB::ExtendCommand::Load#execute... -
IRB
:: ExtendCommandBundle # irb _ require(*opts , &b) -> bool (6303.0) -
現在の irb に関する IRB::Context に対して irb_require コマンドを 実行します。
...現在の irb に関する IRB::Context に対して irb_require コマンドを
実行します。
@see IRB::ExtendCommand::Require#execute... -
Syslog
:: Logger # debug(message = nil , &block) -> true (6302.0) -
DEBUG 情報を出力します。syslog の DEBUG の情報として記録されます。
...DEBUG 情報を出力します。syslog の DEBUG の情報として記録されます。
ブロックを与えなかった場合は、message をメッセージとしてログを出力します。
ブロックを与えた場合は、ブロックを評価した結果をメッセージとして......ログを出力します。
引数とブロックを同時に与えた場合は、message をメッセージとしてログを出
力します(ブロックは評価されません)。
@see Syslog::Logger::LEVEL_MAP, Logger#debug... -
Proc
# lambda? -> bool (6267.0) -
手続きオブジェクトの引数の取扱が厳密であるならば true を返します。
...][ruby]{
# lambda で生成した Proc オブジェクトでは true
lambda{}.lambda? # => true
# proc で生成した Proc オブジェクトでは false
proc{}.lambda? # => false
# Proc.new で生成した Proc オブジェクトでは false
Proc.new{}.lambda? # => false
# 以下、lambda?が......視する
proc{|a,b| [a,b]}.call(1,2,3) # => [1,2]
# 足りない引数には nil が渡される
proc{|a,b| [a,b]}.call(1) # => [1, nil]
# 配列1つだと展開される
proc{|a,b| [a,b]}.call([1,2]) # => [1,2]
# lambdaの場合これらはすべて ArgumentError となる
# &が付いた仮引......ambda? が偽となる
def n(&b) b.lambda? end
n {} # => false
# &が付いた実引数によるものは、lambda?が元の Procオブジェクトから
# 引き継がれる
lambda(&lambda {}).lambda? #=> true
proc(&lambda {}).lambda? #=> true
Proc.new(&lambda {}).lambda? #=> true
lambda(&p... -
Integer
# allbits?(mask) -> bool (6259.0) -
self & mask の全てのビットが 1 なら true を返します。
...f & mask の全てのビットが 1 なら true を返します。
self & mask == mask と等価です。
@param mask ビットマスクを整数で指定します。
//emlist[][ruby]{
42.allbits?(42) # => true
0b1010_1010.allbits?(0b1000_0010) # => true
0b1010_1010.allbits?(0b1......000_0001) # => false
0b1000_0010.allbits?(0b1010_1010) # => false
//}
@see Integer#anybits?
@see Integer#nobits?... -
Integer
# anybits?(mask) -> bool (6259.0) -
self & mask のいずれかのビットが 1 なら true を返します。
...elf & mask のいずれかのビットが 1 なら true を返します。
self & mask != 0 と等価です。
@param mask ビットマスクを整数で指定します。
//emlist[][ruby]{
42.anybits?(42) # => true
0b1010_1010.anybits?(0b1000_0010) # => true
0b1010_1010.anybits......?(0b1000_0001) # => true
0b1000_0010.anybits?(0b0010_1100) # => false
//}
@see Integer#allbits?
@see Integer#nobits?... -
Integer
# nobits?(mask) -> bool (6259.0) -
self & mask のすべてのビットが 0 なら true を返します。
...lf & mask のすべてのビットが 0 なら true を返します。
self & mask == 0 と等価です。
@param mask ビットマスクを整数で指定します。
//emlist[][ruby]{
42.nobits?(42) # => false
0b1010_1010.nobits?(0b1000_0010) # => false
0b1010_1010.nobits?(0b1......000_0001) # => false
0b0100_0101.nobits?(0b1010_1010) # => true
//}
@see Integer#allbits?
@see Integer#anybits?... -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (6213.0) -
For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.
...For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument......s will be passed through the method to
other methods.
This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility......exist in Ruby versions
before 2.7, check that the module responds to this method before calling
it. Also, be aware that if this method is removed, the behavior of the
method will change so that it does not pass through keywords.
//emlist[例][ruby]{
module Mod
def foo(meth, *args, &block)
se...