README.EXT, README.EXT.ja: mention about PRIsVALUE [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-11-03 07:12:37 +00:00
parent e3787f8b36
commit 97c1f8cace
2 changed files with 14 additions and 10 deletions

View File

@ -203,9 +203,10 @@ rb_vsprintf(const char *format, va_list ap) ::
Creates a new Ruby string with printf(3) format. Creates a new Ruby string with printf(3) format.
Note: In the format string, %i is used for Object#to_s (or Object#inspect if Note: In the format string, "%"PRIsVALUE can be used for Object#to_s
'+' flag is set) output (and related argument must be a VALUE). For integers (or Object#inspect if '+' flag is set) output (and related argument
in format strings, use %d. must be a VALUE). Since it conflicts with "%i", for integers in
format strings, use "%d".
rb_str_cat(VALUE str, const char *ptr, long len) :: rb_str_cat(VALUE str, const char *ptr, long len) ::
@ -1443,9 +1444,10 @@ void rb_bug(const char *fmt, ...) ::
called under the situation caused by the bug in the interpreter. No called under the situation caused by the bug in the interpreter. No
exception handling nor ensure execution will be done. exception handling nor ensure execution will be done.
Note: In the format string, %i is used for Object#to_s (or Object#inspect if Note: In the format string, "%"PRIsVALUE can be used for Object#to_s
'+' flag is set) output (and related argument must be a VALUE). For integers (or Object#inspect if '+' flag is set) output (and related argument
in format strings, use %d. must be a VALUE). Since it conflicts with "%i", for integers in
format strings, use "%d".
== Initialize and Start the Interpreter == Initialize and Start the Interpreter

View File

@ -230,8 +230,9 @@ rb_vsprintf(const char *format, va_list ap)
Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって Cの文字列formatと続く引数をprintf(3)のフォーマットにしたがって
整形しRubyの文字列を生成する 整形しRubyの文字列を生成する
注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を 注意: "%"PRIsVALUEがObject#to_s('+'フラグが指定されている
使ったVALUEの出力に使用されているため整数には%dを使用すること ときはObject#inspect)を使ったVALUEの出力に利用できるこれ
は"%i"と衝突するため,整数には"%d"を使用すること.
rb_str_cat(VALUE str, const char *ptr, long len) rb_str_cat(VALUE str, const char *ptr, long len)
@ -1438,8 +1439,9 @@ void rb_bug(const char *fmt, ...) ::
状況の時呼ぶ.インタープリタはコアダンプし直ちに終了する. 状況の時呼ぶ.インタープリタはコアダンプし直ちに終了する.
例外処理は一切行なわれない. 例外処理は一切行なわれない.
注意: %iはObject#to_s('+'フラグが指定されているときはObject#inspect)を 注意: "%"PRIsVALUEがObject#to_s('+'フラグが指定されていると
使ったVALUEの出力に使用されているため整数には%dを使用すること きはObject#inspect)を使ったVALUEの出力に利用できるこれは
"%i"と衝突するため,整数には"%d"を使用すること.
== Rubyの初期化・実行 == Rubyの初期化・実行