種類
- 文書 (43)
- インスタンスメソッド (33)
- モジュール関数 (33)
- 定数 (11)
モジュール
- Kernel (55)
キーワード
- Converters (11)
- Float (11)
- Integer (11)
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 1 . 0 (3) -
convertible
_ int (22) - putc (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 9 feature (11)
検索結果
先頭5件
-
Rational
# convert(*arg) -> Rational (18113.0) -
引数を有理数(Rational)に変換した結果を返します。
...引数を有理数(Rational)に変換した結果を返します。
@param arg 変換対象のオブジェクトです。
Kernel.#Rational の本体です。
@see Kernel.#Rational... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (15116.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
...Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p......+ name, followed by '=X' where 'X'
is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP,
where 'TYP' is the +type+ name in uppercase with replacing '_t'
suffix with 'T', followed by '=X' where 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.
For......example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:
#define TYPEOF_FOOBAR_T unsigned long
#define FOOBART2NUM ULONG2NUM
#define NUM2FOOBART NUM2ULONG... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (15116.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
...Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p......+ name, followed by '=X' where 'X'
is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP,
where 'TYP' is the +type+ name in uppercase with replacing '_t'
suffix with 'T', followed by '=X' where 'X' is the macro name to
convert +type+ to +Integer+ object, and vice versa.
For......example, if foobar_t is defined as unsigned long, then
convertible_int("foobar_t") would return "unsigned long", and define
macros:
#define TYPEOF_FOOBAR_T unsigned long
#define FOOBART2NUM ULONG2NUM
#define NUM2FOOBART NUM2ULONG... -
Kernel
. # Float(arg) -> Float (9012.0) -
引数を浮動小数点数(Float)に変換した結果を返します。
...#=> 4000.0
p Float(9.88) #=> 9.88
p Float(Time.gm(1986)) #=> 504921600.0
p Float(Object.new) # can't convert Object into Float (TypeError)
p Float(nil) # can't convert nil into Float (TypeError)
p Float("10") #=> 10.0
p Float("10e2") #=> 1000.0
p Float("1e-2")... -
Kernel
. # Float(arg , exception: true) -> Float | nil (9012.0) -
引数を浮動小数点数(Float)に変換した結果を返します。
...#=> 4000.0
p Float(9.88) #=> 9.88
p Float(Time.gm(1986)) #=> 504921600.0
p Float(Object.new) # can't convert Object into Float (TypeError)
p Float(nil) # can't convert nil into Float (TypeError)
p Float("10") #=> 10.0
p Float("10e2") #=> 1000.0
p Float("1e-2")... -
Kernel
. # Integer(arg , base = 0) -> Integer (9012.0) -
引数を整数(Fixnum,Bignum)に変換した結果を返します。
...eger(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9
p Integer(nil) # can't convert nil into Integer (TypeError)
p Integer(Object.new) # cannot convert Object into Integer (TypeError)
p Integer("10") #=> 10
p Integer("10", 2) #=> 2
p Integer("0d10")... -
Kernel
. # Integer(arg , base = 0 , exception: true) -> Integer | nil (9012.0) -
引数を整数(Fixnum,Bignum)に変換した結果を返します。
...eger(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9
p Integer(nil) # can't convert nil into Integer (TypeError)
p Integer(Object.new) # cannot convert Object into Integer (TypeError)
p Integer("10") #=> 10
p Integer("10", 2) #=> 2
p Integer("0d10")... -
Kernel
. # putc(ch) -> object (9006.0) -
文字 ch を 標準出力 $stdout に出力します。
...きないオブジェクトを引数に
指定した場合に発生します。
//emlist[例][ruby]{
putc("ch")
putc(?c)
putc(99)
putc(355)
#=> cccc
putc(99.00) #=> c
putc(33333333333333333333333333333333333) # bignum too big to convert into `long' (RangeError)
//}
@see IO#putc... -
CSV
:: Converters -> Hash (6118.0) -
このハッシュは名前でアクセスできる組み込みの変換器を保持しています。
...保持しています。
CSV#convert で使用する変換器として使用できます。
また CSV.new のオプションとして使用することもできます。
: :integer
Kernel.#Integer を使用してフィールドを変換します。
: :float
Kernel.#Float を使用してフィ... -
NEWS for Ruby 2
. 5 . 0 (42.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...r#anybits?, Integer#nobits? を追加 12753
* Integer.sqrt を追加 13219
* Kernel
* Object#yield_self を追加 6721
* Kernel.#pp をrequireなしで使えるようにしました 14123
* Kernel.#warn :uplevel というキーワード引数を追加しました 12882
* Met......がマルチユーザーセーフである場合のみ。12921
* open-uri
* URI.open を open-uri の Kernel.open の別名として追加しました。
将来 open-uri の Kernel.open は非推奨になります。
* openssl
* Ruby/OpenSSLのバージョンを2.0から2.1に更.......1.0"セクションにあります。
* pathname
* Pathname#glob を追加 7360
* psych
* Psych 3.0.2 に更新しました
* Convert fallback option to a keyword argument
https://github.com/ruby/psych/pull/342
* Add :symbolize_names option to Psych.load, Psych.saf... -
NEWS for Ruby 3
. 1 . 0 (36.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...間をナノ秒で返します。 10917
* Integer
* 新規メソッド
* Integer.try_convert が追加されました。 15211
* Kernel
* 変更されたメソッド
* Kernel#load が第2引数にモジュールを渡せるようになり、渡されたモジュールをト......した。これは fork(2) のコアメソッドです。このメソッドを直接呼び出さないでください。既存のforkメソッド(Kernel.#fork、Process.fork、IO.popen("-"))によって呼び出されます。アプリケーションモニタリングライブラリは、このメ......降の引数に警告されるようになりました。 14256
* lib/debug.rb が debug.gem に置き換えられました。
* lib/pp.rb の Kernel#pp がデフォルトで IO#winsize の幅を使用するようになりました。出力幅が端末サイズに応じて自動的に変更さ... -
ruby 1
. 9 feature (18.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
.../Maker [lib] [new]
((<Imageモジュール|URL:http://web.resource.org/rss/1.0/modules/image/>))のサポート
=== 2005-02-03
: RSS::Element#convert(value) [lib] [new]
valueのエンコーディングを変換するメソッドを公開。
valueのエンコーディングは要素の......#=> ruby 1.9.0 (2004-04-25) [i386-mswin32]
["{"]
=== 2004-04-08
: Iconv.list [lib] [compat]
((<ruby-dev:23063>))
=== 2004-04-06
: Kernel#open [ruby] [change]
可能なら最初の引数に対して to_open を呼ぶようになりました。
: Exception#to_str [ruby] [obsolete]......>))
$ ruby -e 'p [2**32].pack("i")'
"\000\000\000\000"
$ ruby -e 'p [2**32].pack("U")'
-e:1:in `pack': bignum too big to convert into `long' (RangeError)
from -e:1
=== 2004-01-22
: ((<組み込み定数/VERSION>)) [obsolete]
: ((<組み込み定数/RELEASE_D... -
ruby 1
. 6 feature (12.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...対して例外が発生していました。
((<ruby-bugs-ja:PR#114>))
p(-1[10000000000])
=> -:1:in `[]': bignum too big to convert into `int' (RangeError)
from -:1
ruby 1.6.5 (2001-09-19) [i586-linux]
=> ruby 1.6.5 (2001-11-01) [i586-linux]......def initialize(obj) @obj = obj end
def []=() @obj = obj end
def []() @obj end
end
module Kernel
def _ptr() Ptr.new(self) end
end
def foo(int)
int[] += 1
end
x = 1._ptr...