ライブラリ
- ビルトイン (52)
- csv (24)
- mkmf (24)
-
rdoc
/ markup (12)
クラス
- CSV (24)
- Integer (4)
-
RDoc
:: Markup (12) - String (12)
モジュール
- Kernel (60)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Converters (12)
- Float (12)
- HeaderConverters (12)
- Integer (12)
-
NEWS for Ruby 2
. 5 . 0 (8) -
convertible
_ int (24) - putc (12)
- rdoc (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 9 feature (12) -
try
_ convert (16)
検索結果
先頭5件
-
RDoc
:: Markup # convert(str , formatter) -> object | "" (18202.0) -
str で指定された文字列を formatter に変換させます。
str で指定された文字列を formatter に変換させます。
@param str 変換する文字列を指定します。
@param formatter SM::ToHtml、SM::ToLaTeX などのインスタンス
を指定します。
変換結果は formatter によって文字列や配列を返します。 -
Integer
. try _ convert(obj) -> Integer | nil (6135.0) -
obj を Integer に変換しようと試みます。変換には Object#to_int メソッドが使われます。
...obj を Integer に変換しようと試みます。変換には Object#to_int
メソッドが使われます。
Integer ならそのままobjを返します。
そうでなければ obj.to_int の結果を返すか、nil が返されます。
@param obj 変換する任意のオブジェクト......@return Integer または nil
@raise TypeError to_int が Integer を返さなかった場合に発生します。
//emlist[例][ruby]{
Integer.try_convert(1) # => 1
Integer.try_convert(1.25) # => 1
Integer.try_convert([]) # => nil
//}... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (6132.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......wed 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 f......oobar_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) { . . . } (6132.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......wed 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 f......oobar_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... -
String
. try _ convert(obj) -> String | nil (6129.0) -
obj を String に変換しようと試みます。変換には Object#to_str メソッ ドが使われます。変換後の文字列を返すか、何らかの理由により変換できなかっ た場合は nil が返されます。
...obj を String に変換しようと試みます。変換には Object#to_str メソッ
ドが使われます。変換後の文字列を返すか、何らかの理由により変換できなかっ
た場合は nil が返されます。
@param obj 変換する任意のオブジェクト
@return......変換後の文字列または nil
//emlist[例][ruby]{
String.try_convert("str") # => "str"
String.try_convert(/re/) # => nil
//}... -
CSV
:: Converters -> Hash (6112.0) -
このハッシュは名前でアクセスできる組み込みの変換器を保持しています。
...このハッシュは名前でアクセスできる組み込みの変換器を保持しています。
CSV#convert で使用する変換器として使用できます。
また CSV.new のオプションとして使用することもできます。
: :integer
Kernel.#Integer を使用してフ......グ
を UTF-8 に変換出来なかった場合は、変換には失敗しますが、データは変更されません。
このハッシュは Object#freeze されていないので、ユーザは自由に値を
追加することが出来ます。
複数の変換器を持つ要素を追加す... -
CSV
:: HeaderConverters -> Hash (6112.0) -
このハッシュは名前でアクセスできる組み込みのヘッダ用変換器を保存しています。
...このハッシュは名前でアクセスできる組み込みのヘッダ用変換器を保存しています。
CSV#header_convert で使用する変換器として使用できます。
また CSV.new のオプションとして使用することもできます。
: :downcase
ヘッダの文......グ
を UTF-8 に変換できなかった場合は、変換には失敗しますが、データは変更されません。
このハッシュは Object#freeze されていないので、ユーザは自由に値を
追加することが出来ます。
複数の変換器を持つ要素を追加す... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (426.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...スは特異クラス自身であると定義されました
((<ruby-bugs-ja:313>))。なんだかよくわかりません(^^;
class << Object
p [self.id, self]
class << self
p [self.id, self]
end
end
=> ruby 1.6.7 (2002-03-01) [i5......537771634, Class]
[537742484, Class]
=> ruby 1.7.3 (2002-09-05) [i586-linux]
[537771634, #<Class:Object>]
[537771634, #<Class:Object>]
さらに、オブジェクトの特異クラスのスーパークラスの特異クラスと
オブジェクトの特......なくなりました。
p Float(nil)
=> ruby 1.6.7 (2002-03-01) [i586-linux]
0.0
=> -:1:in `Float': cannot convert nil into Float (TypeError)
from -:1
ruby 1.7.3 (2002-09-02) [i586-linux]
=== ARGF
: ((<ARGF#to_s|ARGF/to_s>)) [change]... -
Kernel
. # putc(ch) -> object (107.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...