クラス
-
ARGF
. class (11) - Bignum (3)
-
Enumerator
:: Lazy (74) - Fixnum (3)
- Integer (32)
- Object (11)
-
Process
:: Status (11) -
RubyVM
:: InstructionSequence (44) - String (77)
キーワード
- [] (21)
-
absolute
_ path (11) -
base
_ label (11) - chunk (11)
- gsub (44)
- label (11)
- path (11)
-
singleton
_ class (11) -
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - sub (33)
-
to
_ io (11)
検索結果
先頭5件
-
Bignum
# >>(bits) -> Fixnum | Bignum (21215.0) -
シフト演算子。bits だけビットを右にシフトします。
...bits だけビットを右にシフトします。
右シフトは、符号ビット(最上位ビット(MSB))が保持されます。
bitsが実数の場合、小数点以下を切り捨てた値でシフトします。
@param bits シフトさせるビット数
printf("%#b\n", 0b0101 >> 1) #......=> 0b10
p -1 >> 1 #=> -1... -
Fixnum
# >>(bits) -> Fixnum | Bignum (21215.0) -
シフト演算子。bits だけビットを右にシフトします。
...bits だけビットを右にシフトします。
右シフトは、符号ビット(最上位ビット(MSB))が保持されます。
bitsが実数の場合、小数点以下を切り捨てた値でシフトします。
@param bits シフトさせるビット数
printf("%#b\n", 0b0101 >> 1) #......=> 0b10
p -1 >> 1 #=> -1... -
Integer
# >>(bits) -> Integer (21215.0) -
シフト演算子。bits だけビットを右にシフトします。
...子。bits だけビットを右にシフトします。
右シフトは、符号ビット(最上位ビット(MSB))が保持されます。
bitsが実数の場合、小数点以下を切り捨てた値でシフトします。
@param bits シフトさせるビット数
//emlist[][ruby]{
printf("%#......b\n", 0b0101 >> 1) # => 0b10
p -1 >> 1 # => -1
//}... -
Process
:: Status # >>(num) -> Integer (18247.0) -
self.to_i >> num と同じです。
...self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99... -
ARGF
. class # to _ io -> IO (6209.0) -
ARGFが現在開いているファイルのFile、またはIOオブジェクトを 返します。
...ARGFが現在開いているファイルのFile、またはIOオブジェクトを
返します。
ARGF.to_io # => #<File:glark.txt>
ARGF.to_io # => #<IO:<STDIN>>
@see ARGF.class#file, ARGF.class#to_write_io... -
Enumerator
:: Lazy # slice _ when {|elt _ before , elt _ after| bool } -> Enumerator :: Lazy (6133.0) -
Enumerable#slice_when と同じですが、配列ではなく Enumerator::Lazy を返します。
...erable#slice_when と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_when { |i, j| (i + j) % 5 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007fce84118348>:each>>
1.step.lazy.slice_when { |i, j| (i + j) %......5 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5, 6, 7], [8, 9, 10, 11, 12], [13, 14, 15, 16, 17], [18, 19, 20, 21, 22]]
//}
@see Enumerable#slice_when... -
Enumerator
:: Lazy # slice _ after {|elt| bool } -> Enumerator :: Lazy (6109.0) -
Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_after { |e| e % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007fd73980e6f8>:each>>
1.step.lazy.slice_after { |e| e % 3 == 0 }.tak......e(5).force
# => [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]
//}
@see Enumerable#slice_after... -
Enumerator
:: Lazy # slice _ after(pattern) -> Enumerator :: Lazy (6109.0) -
Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_after と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_after { |e| e % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007fd73980e6f8>:each>>
1.step.lazy.slice_after { |e| e % 3 == 0 }.tak......e(5).force
# => [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]
//}
@see Enumerable#slice_after... -
Enumerator
:: Lazy # slice _ before {|elt| bool } -> Enumerator :: Lazy (6109.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.t......ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}
@see Enumerable#slice_before... -
Enumerator
:: Lazy # slice _ before(initial _ state) {|elt , state| bool } -> Enumerator :: Lazy (6109.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.t......ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}
@see Enumerable#slice_before... -
Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy (6109.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.t......ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}
@see Enumerable#slice_before...