4555件ヒット
[1-100件を表示]
(0.070秒)
別のキーワード
ライブラリ
クラス
-
ARGF
. class (24) - Array (293)
- BasicObject (12)
- BigDecimal (156)
- Binding (7)
- CSV (36)
-
CSV
:: FieldInfo (24) -
CSV
:: Row (12) -
CSV
:: Table (24) - Complex (24)
- Data (3)
- Dir (35)
-
Encoding
:: Converter (48) - Enumerator (12)
-
Fiddle
:: Function (12) - File (12)
-
File
:: Stat (204) - Float (105)
- Hash (36)
- IO (128)
- Integer (842)
-
JSON
:: State (12) - Logger (36)
- MatchData (82)
- Matrix (139)
- Method (36)
- Module (24)
- Mutex (2)
- NilClass (12)
- Numeric (201)
- Object (84)
-
OpenSSL
:: BN (36) - OptionParser (156)
- Pathname (36)
- Prime (24)
-
Prime
:: EratosthenesGenerator (24) - Proc (24)
-
REXML
:: Attributes (24) -
REXML
:: Elements (12) - Random (48)
- Range (28)
- Rational (84)
- Regexp (60)
-
Ripper
:: Lexer (24) -
RubyVM
:: AbstractSyntaxTree :: Node (28) -
RubyVM
:: InstructionSequence (12) - Set (36)
- SignalException (12)
- String (309)
- StringIO (48)
- StringScanner (120)
- Struct (72)
- Thread (55)
-
Thread
:: Backtrace :: Location (12) -
Thread
:: Mutex (10) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (12) - Time (240)
- TracePoint (12)
- UnboundMethod (48)
- Vector (12)
-
WIN32OLE
_ METHOD (12)
モジュール
- Enumerable (176)
-
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
Net
:: HTTPHeader (24)
キーワード
- % (24)
- & (12)
- * (12)
- ** (12)
- + (12)
- - (12)
- -@ (12)
-
/ (11) - < (12)
- << (33)
- <= (12)
- <=> (36)
- == (12)
- === (12)
- =~ (24)
- > (12)
- >= (12)
- >> (12)
- [] (36)
- []= (19)
- ^ (12)
-
_ _ id _ _ (12) - abs (12)
-
add
_ trace _ func (12) - allbits? (8)
- any? (48)
- anybits? (8)
- arity (36)
- begin (12)
-
bit
_ length (12) - blksize (12)
- blocks (12)
-
bsearch
_ index (20) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (24)
- bytesize (12)
- call (12)
- ceil (72)
- ceildiv (3)
- charpos (12)
- chown (12)
- chr (36)
- class (12)
- classify (12)
- codepoints (24)
- coerce (24)
-
cofactor
_ expansion (12) - concat (18)
-
const
_ source _ location (12) -
content
_ length (12) - converters (12)
- count (84)
- day (12)
- delete (12)
- denominator (48)
-
dev
_ major (12) -
dev
_ minor (12) - dig (9)
- digits (24)
- div (24)
- downto (24)
-
elements
_ to _ i (12) - end (12)
- even? (12)
- exist? (12)
- fcntl (12)
-
field
_ size _ limit (12) - fileno (23)
-
find
_ index (108) -
first
_ column (7) -
first
_ lineno (19) - floor (72)
- gcd (12)
- gcdlcm (12)
- getbyte (36)
- gid (12)
-
gmt
_ offset (12) - gmtoff (12)
- hash (123)
- hex (12)
- hour (12)
- index (108)
- ino (12)
- inspect (12)
-
int
_ from _ prime _ division (12) - integer? (24)
- invkind (12)
-
laplace
_ expansion (12) -
last
_ column (7) -
last
_ lineno (7) - lcm (12)
- length (108)
- level (12)
- lex (12)
- line (12)
- lineno (36)
- magnitude (12)
- match? (12)
-
matched
_ size (12) - max (12)
-
max
_ nesting (12) - mday (12)
- method (12)
- min (12)
- mode (12)
- modulo (12)
- mon (12)
- month (12)
-
named
_ captures (12) - next (24)
- nlink (12)
- nobits? (8)
- nsec (12)
-
num
_ bits (12) -
num
_ bytes (12) -
num
_ waiting (12) - numerator (36)
-
object
_ id (12) - oct (12)
- odd? (12)
- offset (24)
- on (144)
- one? (45)
- ord (24)
- owner (12)
- pack (21)
- parse (12)
- pathconf (12)
- pid (12)
- pointer (12)
- pos (36)
- pow (24)
- pred (12)
- prime? (12)
-
prime
_ division (24) -
primitive
_ convert (48) - priority (12)
- priority= (12)
-
public
_ method (12) - pwrite (8)
- rand (36)
-
range
_ length (12) - rank (12)
- rationalize (24)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - readbyte (36)
- real? (12)
- remainder (12)
-
rest
_ size (12) - restsize (12)
-
reverse
_ each (4) - rindex (48)
- round (93)
-
safe
_ level (7) - sec (12)
- seed (12)
-
set
_ trace _ func (12) - setbyte (12)
-
sev
_ threshold (12) - sign (12)
- signo (12)
-
singleton
_ class (12) - size (180)
- size? (12)
- skip (12)
-
skip
_ until (12) - sleep (12)
-
sort
_ by (24) -
source
_ location (43) - split (12)
- step (93)
- subsec (12)
- succ (24)
- sum (54)
-
summary
_ width (12) - syswrite (12)
- tally (8)
- tell (24)
- times (24)
-
to
_ bn (12) -
to
_ f (24) -
to
_ i (96) -
to
_ int (36) -
to
_ json (12) -
to
_ r (12) -
to
_ s (36) - tr (12)
- trace (12)
- truncate (84)
-
tv
_ nsec (12) -
tv
_ sec (12) -
tv
_ usec (12) - uid (12)
- unlink (12)
- unpack (12)
- upto (24)
- usec (12)
-
utc
_ offset (12) -
values
_ at (12) - wday (12)
-
world
_ readable? (12) -
world
_ writable? (12) - write (24)
- yday (12)
- year (12)
- | (12)
- ~ (24)
検索結果
先頭5件
-
Integer
# integer? -> true (27126.0) -
常に真を返します。
...常に真を返します。
//emlist[][ruby]{
1.integer? # => true
1.0.integer? # => false
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ column -> Integer (26114.0) -
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_column # => 0
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # first _ lineno -> Integer (26114.0) -
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
...ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_lineno # => 1
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # last _ column -> Integer (26114.0) -
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
...ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_column # => 5
//}... -
RubyVM
:: AbstractSyntaxTree :: Node # last _ lineno -> Integer (26114.0) -
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
...ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_lineno # => 1
//}... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (26102.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...の 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2... -
Integer
# prime _ division(generator = Prime :: Generator23 . new) -> [[Integer , Integer]] (21215.0) -
自身を素因数分解した結果を返します。
...、第2要素は n**e が self を割り切る最大の自然数 e です。
@raise ZeroDivisionError self がゼロである場合に発生します。
@see Prime#prime_division
//emlist[例][ruby]{
require 'prime'
12.prime_division #=> [[2,2], [3,1]]
10.prime_division #=> [[2,1], [5,1]]
//}... -
Integer
# div(other) -> Integer (21150.0) -
整商(整数の商)を返します。 普通の商(剰余を考えない商)を越えない最大の整数をもって整商とします。
...整商とします。
other が Integer オブジェクトの場合、Integer#/ の結果と一致します。
div に対応する剰余メソッドは modulo です。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[例][ruby]{
7.div(2) # => 3
7.div(-2) # => -4......=> 3
begin
2.div(0)
rescue => e
e # => #<ZeroDivisionError: divided by 0>
end
begin
2.div(0.0)
rescue => e
e # => #<ZeroDivisionError: divided by 0>
# Integer#/ と違い、引数が Float でもゼロで割ることはできない
end
//}
@see Integer#fdiv, Integer#/, Integer#modulo... -
Integer
# [](nth) -> Integer (21140.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...lf[..j] で n & ((1 << (j + 1)) - 1) が 0 以外のとき
@raise ArgumentError self[...j] で n & ((1 << j) - 1) が 0 以外のとき
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110......01
//}
n[i] は (n >> i) & 1 と等価なので、負のインデックスは常に 0 を返します。
//emlist[][ruby]{
p 255[-1] # => 0
//}
//emlist[複数ビットの例][ruby]{
0b01001101[2, 4] #=> 0b0011
0b01001100[2..5] #=> 0b0011
0b01001100[2...6] #=> 0b0011
# ^^^^
//}
self[nth]=bit... -
Integer
# [](nth , len) -> Integer (21140.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...lf[..j] で n & ((1 << (j + 1)) - 1) が 0 以外のとき
@raise ArgumentError self[...j] で n & ((1 << j) - 1) が 0 以外のとき
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110......01
//}
n[i] は (n >> i) & 1 と等価なので、負のインデックスは常に 0 を返します。
//emlist[][ruby]{
p 255[-1] # => 0
//}
//emlist[複数ビットの例][ruby]{
0b01001101[2, 4] #=> 0b0011
0b01001100[2..5] #=> 0b0011
0b01001100[2...6] #=> 0b0011
# ^^^^
//}
self[nth]=bit... -
Integer
# [](range) -> Integer (21140.0) -
nth 番目のビット(最下位ビット(LSB)が 0 番目)が立っている時 1 を、そうでなければ 0 を返します。
...lf[..j] で n & ((1 << (j + 1)) - 1) が 0 以外のとき
@raise ArgumentError self[...j] で n & ((1 << j) - 1) が 0 以外のとき
//emlist[][ruby]{
a = 0b11001100101010
30.downto(0) {|n| print a[n] }
# => 0000000000000000011001100101010
a = 9**15
50.downto(0) {|n| print a[n] }
# => 000101110......01
//}
n[i] は (n >> i) & 1 と等価なので、負のインデックスは常に 0 を返します。
//emlist[][ruby]{
p 255[-1] # => 0
//}
//emlist[複数ビットの例][ruby]{
0b01001101[2, 4] #=> 0b0011
0b01001100[2..5] #=> 0b0011
0b01001100[2...6] #=> 0b0011
# ^^^^
//}
self[nth]=bit... -
Integer
# gcd(n) -> Integer (21138.0) -
自身と整数 n の最大公約数を返します。
...//emlist[][ruby]{
2.gcd(2) # => 2
3.gcd(7) # => 1
3.gcd(-7) # => 1
((1<<31)-1).gcd((1<<61)-1) # => 1
//}
また、self や n が 0 だった場合は、0 ではない方の整数の絶対値を返します。
//emlist[][ruby]{
3.gcd(0)......# => 3
0.gcd(-7) # => 7
//}
@see Integer#lcm, Integer#gcdlcm...