1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* removed trailing spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-05-29 18:51:39 +00:00
parent 5d394118ff
commit 45f6fbf339
19 changed files with 86 additions and 92 deletions

View file

@ -21,8 +21,8 @@ Sun May 30 02:21:34 2010 Yusuke Endoh <mame@tsg.ne.jp>
Sun May 30 01:25:48 2010 Masaya Tarui <tarui@ruby-lnag.org> Sun May 30 01:25:48 2010 Masaya Tarui <tarui@ruby-lnag.org>
* thread.c (RB_GC_SAVE_MACHINE_CONTEXT): start GC * thread.c (RB_GC_SAVE_MACHINE_CONTEXT): start GC
by switching the thread if gc_stress == true by switching the thread if gc_stress == true
* gc.c (ruby_gc_stress_start): ditto. * gc.c (ruby_gc_stress_start): ditto.
@ -103,7 +103,7 @@ Fri May 28 10:40:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
Fri May 28 00:47:16 2010 Masaya Tarui <tarui@ruby-lnag.org> Fri May 28 00:47:16 2010 Masaya Tarui <tarui@ruby-lnag.org>
* error.c (rb_bug): suppress the error report dialog if report_bug() * error.c (rb_bug): suppress the error report dialog if report_bug()
is finished successfly. is finished successfly.
Fri May 28 00:32:25 2010 Yusuke Endoh <mame@tsg.ne.jp> Fri May 28 00:32:25 2010 Yusuke Endoh <mame@tsg.ne.jp>
@ -254,7 +254,6 @@ Sun May 23 07:08:34 2010 Aaron Patterson <aaron@tenderlovemaking.com>
* ext/psych/lib/psych/json/tree_builder.rb: refactor * ext/psych/lib/psych/json/tree_builder.rb: refactor
* ext/psych/lib/psych/visitors/json_tree.rb: refactor * ext/psych/lib/psych/visitors/json_tree.rb: refactor
Sat May 22 03:53:05 2010 Satoshi Shiba <shiba@rvm.jp> Sat May 22 03:53:05 2010 Satoshi Shiba <shiba@rvm.jp>
@ -772,7 +771,7 @@ Sat May 8 13:48:31 2010 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* array.c (rb_ary_fetch, rb_ary_splice, rb_ary_store): Improve * array.c (rb_ary_fetch, rb_ary_splice, rb_ary_store): Improve
IndexError IndexError
messages [ruby-core:28394] messages [ruby-core:28394]
* hash.c (rb_hash_fetch_m): Improve KeyError message * hash.c (rb_hash_fetch_m): Improve KeyError message
Sat May 8 13:11:28 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> Sat May 8 13:11:28 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
@ -1154,21 +1153,21 @@ Fri Apr 30 11:40:44 2010 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* eval.c (make_exception, rb_obj_extend): Fix error messages in case * eval.c (make_exception, rb_obj_extend): Fix error messages in case
of wrong of wrong
number of arguments number of arguments
* file.c (rb_f_test, rb_file_s_umask): ditto * file.c (rb_f_test, rb_file_s_umask): ditto
* numeric.c (int_chr, num_step): ditto * numeric.c (int_chr, num_step): ditto
* process.c (rb_f_sleep): ditto * process.c (rb_f_sleep): ditto
* re.c (rb_reg_initialize_m): ditto * re.c (rb_reg_initialize_m): ditto
* signal.c (rb_f_kill, sig_trap): ditto * signal.c (rb_f_kill, sig_trap): ditto
* string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count, * string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count,
rb_str_delete_bang, rb_str_delete_bang,
rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto
* proc.c (curry): rdoc fix * proc.c (curry): rdoc fix
Fri Apr 30 04:09:30 2010 NAKAMURA Usaku <usa@ruby-lang.org> Fri Apr 30 04:09:30 2010 NAKAMURA Usaku <usa@ruby-lang.org>
@ -4634,7 +4633,6 @@ Tue Jan 26 20:21:28 2010 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/eq.rb: fix circular require in drb. * lib/drb/eq.rb: fix circular require in drb.
reported by akr. see [ruby-dev:40156] [ruby-core:27661] reported by akr. see [ruby-dev:40156] [ruby-core:27661]
Tue Jan 26 19:59:17 2010 NARUSE, Yui <naruse@ruby-lang.org> Tue Jan 26 19:59:17 2010 NARUSE, Yui <naruse@ruby-lang.org>
* ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc. [Bug #2656] * ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc. [Bug #2656]
@ -4889,7 +4887,6 @@ Tue Jan 19 09:03:37 2010 Aaron Patterson <tenderlove@ruby-lang.org>
* test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551] * test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551]
Tue Jan 19 02:02:32 2010 Yusuke Endoh <mame@tsg.ne.jp> Tue Jan 19 02:02:32 2010 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_array.rb: add some tests (for coverage). * test/ruby/test_array.rb: add some tests (for coverage).
@ -6710,7 +6707,6 @@ Wed Oct 28 14:51:31 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/etc/etc.c (etc_each_group): fixed typo. * ext/etc/etc.c (etc_each_group): fixed typo.
Wed Oct 28 13:02:10 2009 Shugo Maeda <shugo@ruby-lang.org> Wed Oct 28 13:02:10 2009 Shugo Maeda <shugo@ruby-lang.org>
* lib/net/ftp.rb (Net::FTP#initialize): sets @binary to true. * lib/net/ftp.rb (Net::FTP#initialize): sets @binary to true.
@ -8044,7 +8040,6 @@ Wed Sep 23 11:28:06 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* tool/instruction.rb (make_footer_stack_val): ditto. * tool/instruction.rb (make_footer_stack_val): ditto.
Wed Sep 23 05:03:36 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca> Wed Sep 23 05:03:36 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* proc.c (umethod_bind, rb_mod_define_method): Fix bug that * proc.c (umethod_bind, rb_mod_define_method): Fix bug that
@ -8468,7 +8463,6 @@ Mon Sep 14 03:30:23 2009 Alexander Zavorine <alexandre.zavorine@nokia.com>
* symbian/configure.bat: fixed harmless error message. * symbian/configure.bat: fixed harmless error message.
Sun Sep 13 22:18:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Sep 13 22:18:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* variable.c (rb_mod_remove_const): do not change VM state when an * variable.c (rb_mod_remove_const): do not change VM state when an

View file

@ -1610,7 +1610,7 @@ ary_join_1(VALUE obj, VALUE ary, VALUE sep, long i, VALUE result)
} }
else { else {
VALUE args[3]; VALUE args[3];
args[0] = val; args[0] = val;
args[1] = sep; args[1] = sep;
args[2] = result; args[2] = result;
@ -1865,7 +1865,7 @@ rb_ary_rotate(VALUE ary, long cnt)
return Qnil; return Qnil;
} }
/* /*
* call-seq: * call-seq:
* ary.rotate!(cnt=1) -> ary * ary.rotate!(cnt=1) -> ary

View file

@ -2670,7 +2670,7 @@ big_shift(VALUE x, long n)
return x; return x;
} }
static VALUE static VALUE
big_fdiv(VALUE x, VALUE y) big_fdiv(VALUE x, VALUE y)
{ {
#define DBL_BIGDIG ((DBL_MANT_DIG + BITSPERDIG) / BITSPERDIG) #define DBL_BIGDIG ((DBL_MANT_DIG + BITSPERDIG) / BITSPERDIG)

32
class.c
View file

@ -243,7 +243,7 @@ rb_singleton_class_attached(VALUE klass, VALUE obj)
#define METACLASS_OF(k) RBASIC(k)->klass #define METACLASS_OF(k) RBASIC(k)->klass
/*! /*!
* whether k is a meta^(n)-class of Class class * whether k is a meta^(n)-class of Class class
@ -344,7 +344,7 @@ Init_class_hierarchy(void)
rb_cModule = boot_defclass("Module", rb_cObject); rb_cModule = boot_defclass("Module", rb_cObject);
rb_cClass = boot_defclass("Class", rb_cModule); rb_cClass = boot_defclass("Class", rb_cModule);
RBASIC(rb_cClass)->klass RBASIC(rb_cClass)->klass
= RBASIC(rb_cModule)->klass = RBASIC(rb_cModule)->klass
= RBASIC(rb_cObject)->klass = RBASIC(rb_cObject)->klass
= RBASIC(rb_cBasicObject)->klass = RBASIC(rb_cBasicObject)->klass
@ -419,10 +419,10 @@ rb_class_inherited(VALUE super, VALUE klass)
/*! /*!
* Defines a top-level class. * Defines a top-level class.
* \param name name of the class * \param name name of the class
* \param super a class from which the new class will derive. * \param super a class from which the new class will derive.
* NULL means \c Object class. * NULL means \c Object class.
* \return the created class * \return the created class
* \throw TypeError if the constant name \a name is already taken but * \throw TypeError if the constant name \a name is already taken but
* the constant is not a \c Class. * the constant is not a \c Class.
* \throw NameError if the class is already defined but the class can not * \throw NameError if the class is already defined but the class can not
* be reopened because its superclass is not \a super. * be reopened because its superclass is not \a super.
@ -465,10 +465,10 @@ rb_define_class(const char *name, VALUE super)
* Defines a class under the namespace of \a outer. * Defines a class under the namespace of \a outer.
* \param outer a class which contains the new class. * \param outer a class which contains the new class.
* \param name name of the new class * \param name name of the new class
* \param super a class from which the new class will derive. * \param super a class from which the new class will derive.
* NULL means \c Object class. * NULL means \c Object class.
* \return the created class * \return the created class
* \throw TypeError if the constant name \a name is already taken but * \throw TypeError if the constant name \a name is already taken but
* the constant is not a \c Class. * the constant is not a \c Class.
* \throw NameError if the class is already defined but the class can not * \throw NameError if the class is already defined but the class can not
* be reopened because its superclass is not \a super. * be reopened because its superclass is not \a super.
@ -488,10 +488,10 @@ rb_define_class_under(VALUE outer, const char *name, VALUE super)
* Defines a class under the namespace of \a outer. * Defines a class under the namespace of \a outer.
* \param outer a class which contains the new class. * \param outer a class which contains the new class.
* \param id name of the new class * \param id name of the new class
* \param super a class from which the new class will derive. * \param super a class from which the new class will derive.
* NULL means \c Object class. * NULL means \c Object class.
* \return the created class * \return the created class
* \throw TypeError if the constant name \a name is already taken but * \throw TypeError if the constant name \a name is already taken but
* the constant is not a \c Class. * the constant is not a \c Class.
* \throw NameError if the class is already defined but the class can not * \throw NameError if the class is already defined but the class can not
* be reopened because its superclass is not \a super. * be reopened because its superclass is not \a super.
@ -1019,12 +1019,12 @@ rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
* These API takes a C function as a method body. * These API takes a C function as a method body.
* *
* \par Method body functions * \par Method body functions
* Method body functions must return a VALUE and * Method body functions must return a VALUE and
* can be one of the following form: * can be one of the following form:
* <dl> * <dl>
* <dt>Fixed number of parameters</dt> * <dt>Fixed number of parameters</dt>
* <dd> * <dd>
* This form is a normal C function, excepting it takes * This form is a normal C function, excepting it takes
* a receiver object as the first argument. * a receiver object as the first argument.
* *
* \code * \code
@ -1044,7 +1044,7 @@ rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj)
* <dt>Ruby array style</dt> * <dt>Ruby array style</dt>
* <dd> * <dd>
* This form takes two parameters: self and args. * This form takes two parameters: self and args.
* \a self is the receiver. \a args is an Array object which * \a self is the receiver. \a args is an Array object which
* contains the arguments. * contains the arguments.
* *
* \code * \code
@ -1118,7 +1118,7 @@ rb_undef_method(VALUE klass, const char *name)
* *
* \note DO NOT expose the returned singleton class to * \note DO NOT expose the returned singleton class to
* outside of class.c. * outside of class.c.
* Use \ref rb_singleton_class instead for * Use \ref rb_singleton_class instead for
* consistency of the metaclass hierarchy. * consistency of the metaclass hierarchy.
*/ */
static VALUE static VALUE
@ -1170,11 +1170,11 @@ singleton_class_of(VALUE obj)
* \return the singleton class. * \return the singleton class.
* *
* \post \a obj has its own singleton class. * \post \a obj has its own singleton class.
* \post if \a obj is a class, * \post if \a obj is a class,
* the returned singleton class also has its own * the returned singleton class also has its own
* singleton class in order to keep consistency of the * singleton class in order to keep consistency of the
* inheritance structure of metaclasses. * inheritance structure of metaclasses.
* \note a new singleton class will be created * \note a new singleton class will be created
* if \a obj does not have it. * if \a obj does not have it.
* \note the singleton classes for nil, true and false are: * \note the singleton classes for nil, true and false are:
* NilClass, TrueClass and FalseClass. * NilClass, TrueClass and FalseClass.
@ -1185,7 +1185,7 @@ rb_singleton_class(VALUE obj)
VALUE klass = singleton_class_of(obj); VALUE klass = singleton_class_of(obj);
/* ensures an exposed class belongs to its own eigenclass */ /* ensures an exposed class belongs to its own eigenclass */
if (TYPE(obj) == T_CLASS) ENSURE_EIGENCLASS(klass); if (TYPE(obj) == T_CLASS) ENSURE_EIGENCLASS(klass);
return klass; return klass;
} }

14
enum.c
View file

@ -2273,7 +2273,7 @@ chunk_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* splitted as follows. * splitted as follows.
* *
* [3,1,4,1,5,9,2,6,5,3,5].chunk {|n| * [3,1,4,1,5,9,2,6,5,3,5].chunk {|n|
* n.even? * n.even?
* }.each {|even, ary| * }.each {|even, ary|
* p [even, ary] * p [even, ary]
* } * }
@ -2305,12 +2305,12 @@ chunk_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* For example, the sequence of hyphens in svn log can be eliminated as follows. * For example, the sequence of hyphens in svn log can be eliminated as follows.
* *
* sep = "-"*72 + "\n" * sep = "-"*72 + "\n"
* IO.popen("svn log README") {|f| * IO.popen("svn log README") {|f|
* f.chunk {|line| * f.chunk {|line|
* line != sep || nil * line != sep || nil
* }.each {|_, lines| * }.each {|_, lines|
* pp lines * pp lines
* } * }
* } * }
* #=> ["r20018 | knu | 2008-10-29 13:20:42 +0900 (Wed, 29 Oct 2008) | 2 lines\n", * #=> ["r20018 | knu | 2008-10-29 13:20:42 +0900 (Wed, 29 Oct 2008) | 2 lines\n",
* # "\n", * # "\n",
@ -2322,7 +2322,7 @@ chunk_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* # "\n"] * # "\n"]
* # ... * # ...
* *
* paragraphs separated by empty lines can be parsed as follows. * paragraphs separated by empty lines can be parsed as follows.
* *
* File.foreach("README").chunk {|line| * File.foreach("README").chunk {|line|
* /\A\s*\z/ !~ line || nil * /\A\s*\z/ !~ line || nil
@ -2438,7 +2438,7 @@ slicebefore_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* *
* Creates an enumerator for each chunked elements. * Creates an enumerator for each chunked elements.
* The beginnings of chunks are defined by _pattern_ and the block. * The beginnings of chunks are defined by _pattern_ and the block.
* If _pattern_ === _elt_ returns true or * If _pattern_ === _elt_ returns true or
* the block returns true for the element, * the block returns true for the element,
* the element is beginning of a chunk. * the element is beginning of a chunk.
* *
@ -2471,7 +2471,7 @@ slicebefore_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* } * }
* *
* "svn proplist -R" produces multiline output for each file. * "svn proplist -R" produces multiline output for each file.
* They can be chunked as follows: * They can be chunked as follows:
* *
* IO.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) {|f| * IO.popen([{"LC_ALL"=>"C"}, "svn", "proplist", "-R"]) {|f|
* f.lines.slice_before(/\AProp/).each {|lines| p lines } * f.lines.slice_before(/\AProp/).each {|lines| p lines }
@ -2487,7 +2487,7 @@ slicebefore_i(VALUE yielder, VALUE enumerator, int argc, VALUE *argv)
* For example, three or more consecutive increasing numbers can be squashed * For example, three or more consecutive increasing numbers can be squashed
* as follows: * as follows:
* *
* a = [0,2,3,4,6,7,9] * a = [0,2,3,4,6,7,9]
* prev = a[0] * prev = a[0]
* p a.slice_before {|e| * p a.slice_before {|e|
* prev, prev2 = e, prev * prev, prev2 = e, prev

View file

@ -22,7 +22,7 @@
* *
* An enumerator can be created by following methods. * An enumerator can be created by following methods.
* - Kernel#to_enum * - Kernel#to_enum
* - Kernel#enum_for * - Kernel#enum_for
* - Enumerator.new * - Enumerator.new
* *
* Also, most iteration methods without a block returns an enumerator. * Also, most iteration methods without a block returns an enumerator.
@ -72,7 +72,7 @@
* # convert o.each to an external iterator for * # convert o.each to an external iterator for
* # implementing an internal iterator. * # implementing an internal iterator.
* p ext_each(o.to_enum) {|*x| p x; [:b, *x] } * p ext_each(o.to_enum) {|*x| p x; [:b, *x] }
* #=> [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3 * #=> [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3
* *
*/ */
VALUE rb_cEnumerator; VALUE rb_cEnumerator;
@ -600,18 +600,18 @@ enumerator_peek_values(VALUE obj)
* *
* o = Object.new * o = Object.new
* def o.each * def o.each
* yield * yield
* yield 1 * yield 1
* yield 1, 2 * yield 1, 2
* end * end
* e = o.to_enum * e = o.to_enum
* p e.peek_values #=> [] * p e.peek_values #=> []
* e.next * e.next
* p e.peek_values #=> [1] * p e.peek_values #=> [1]
* p e.peek_values #=> [1] * p e.peek_values #=> [1]
* e.next * e.next
* p e.peek_values #=> [1, 2] * p e.peek_values #=> [1, 2]
* e.next * e.next
* p e.peek_values # raises StopIteration * p e.peek_values # raises StopIteration
* *
*/ */
@ -662,10 +662,10 @@ enumerator_peek(VALUE obj)
* o = Object.new * o = Object.new
* def o.each * def o.each
* # (2) * # (2)
* x = yield * x = yield
* p x #=> "foo" * p x #=> "foo"
* # (5) * # (5)
* x = yield * x = yield
* p x #=> nil * p x #=> nil
* # (7) * # (7)
* x = yield * x = yield
@ -1061,7 +1061,7 @@ generator_each(VALUE obj)
* rescue StopIteration * rescue StopIteration
* p $!.result #=> 100 * p $!.result #=> 100
* end * end
* *
*/ */
static VALUE static VALUE
stop_result(VALUE self) stop_result(VALUE self)

View file

@ -31,7 +31,7 @@ static const char *
rb_strerrno(int err) rb_strerrno(int err)
{ {
#define defined_error(name, num) if (err == num) return name; #define defined_error(name, num) if (err == num) return name;
#define undefined_error(name) #define undefined_error(name)
#include "known_errors.inc" #include "known_errors.inc"
#undef defined_error #undef defined_error
#undef undefined_error #undef undefined_error

6
file.c
View file

@ -3355,7 +3355,7 @@ rb_realpath_internal(VALUE basedir, VALUE path, int strict)
* *
* If _dir_string_ is given, it is used as a base directory * If _dir_string_ is given, it is used as a base directory
* for interpreting relative pathname instead of the current directory. * for interpreting relative pathname instead of the current directory.
* *
* All components of the pathname must exist when this method is * All components of the pathname must exist when this method is
* called. * called.
*/ */
@ -3373,10 +3373,10 @@ rb_file_s_realpath(int argc, VALUE *argv, VALUE klass)
* *
* Returns the real (absolute) pathname of _pathname_ in the actual filesystem. * Returns the real (absolute) pathname of _pathname_ in the actual filesystem.
* The real pathname doesn't contain symlinks or useless dots. * The real pathname doesn't contain symlinks or useless dots.
* *
* If _dir_string_ is given, it is used as a base directory * If _dir_string_ is given, it is used as a base directory
* for interpreting relative pathname instead of the current directory. * for interpreting relative pathname instead of the current directory.
* *
* The last component of the real pathname can be nonexistent. * The last component of the real pathname can be nonexistent.
*/ */
static VALUE static VALUE

2
io.c
View file

@ -1176,7 +1176,7 @@ static void clear_readconv(rb_io_t *fptr);
* f.rewind #=> 0 * f.rewind #=> 0
* f.lineno #=> 0 * f.lineno #=> 0
* f.readline #=> "This is line one\n" * f.readline #=> "This is line one\n"
* *
* Note that it cannot be used with streams such as pipes, ttys, and sockets. * Note that it cannot be used with streams such as pipes, ttys, and sockets.
*/ */

View file

@ -2202,7 +2202,7 @@ rb_Integer(VALUE val)
* when <i>base</i> is omitted or equals to zero, radix indicators * when <i>base</i> is omitted or equals to zero, radix indicators
* (<code>0</code>, <code>0b</code>, and <code>0x</code>) are honored. * (<code>0</code>, <code>0b</code>, and <code>0x</code>) are honored.
* In any case, strings should be strictly conformed to numeric * In any case, strings should be strictly conformed to numeric
* representation. This behavior is different from that of * representation. This behavior is different from that of
* <code>String#to_i</code>. Non string values will be converted using * <code>String#to_i</code>. Non string values will be converted using
* <code>to_int</code>, and <code>to_i</code>. * <code>to_int</code>, and <code>to_i</code>.
* *

16
pack.c
View file

@ -330,7 +330,7 @@ static unsigned long utf8_to_uv(const char*,long*);
* s | Integer | 16-bit signed integer, native endian (int16_t) * s | Integer | 16-bit signed integer, native endian (int16_t)
* l | Integer | 32-bit signed integer, native endian (int32_t) * l | Integer | 32-bit signed integer, native endian (int32_t)
* q | Integer | 64-bit signed integer, native endian (int64_t) * q | Integer | 64-bit signed integer, native endian (int64_t)
* | | * | |
* S_ | Integer | unsigned short, native endian * S_ | Integer | unsigned short, native endian
* I, I_ | Integer | unsigned int, native endian * I, I_ | Integer | unsigned int, native endian
* L_ | Integer | unsigned long, native endian * L_ | Integer | unsigned long, native endian
@ -346,7 +346,7 @@ static unsigned long utf8_to_uv(const char*,long*);
* | | * | |
* U | Integer | UTF-8 character * U | Integer | UTF-8 character
* w | Integer | BER-compressed integer * w | Integer | BER-compressed integer
* *
* Float | | * Float | |
* Directive | | Meaning * Directive | | Meaning
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -356,7 +356,7 @@ static unsigned long utf8_to_uv(const char*,long*);
* e | Float | single-precision float, little-endian byte order * e | Float | single-precision float, little-endian byte order
* G | Float | double-precision float, network (big-endian) byte order * G | Float | double-precision float, network (big-endian) byte order
* g | Float | single-precision float, network (big-endian) byte order * g | Float | single-precision float, network (big-endian) byte order
* *
* String | | * String | |
* Directive | | Meaning * Directive | | Meaning
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -373,7 +373,7 @@ static unsigned long utf8_to_uv(const char*,long*);
* | | (if count is 0, no line feed are added, see RFC 4648) * | | (if count is 0, no line feed are added, see RFC 4648)
* P | String | pointer to a structure (fixed-length string) * P | String | pointer to a structure (fixed-length string)
* p | String | pointer to a null-terminated string * p | String | pointer to a null-terminated string
* *
* Misc. | | * Misc. | |
* Directive | | Meaning * Directive | | Meaning
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
@ -1258,7 +1258,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
* | | * | |
* U | Integer | UTF-8 character * U | Integer | UTF-8 character
* w | Integer | BER-compressed integer (see Array.pack) * w | Integer | BER-compressed integer (see Array.pack)
* *
* Float | | * Float | |
* Directive | Returns | Meaning * Directive | Returns | Meaning
* -------------------------------------------------------------- * --------------------------------------------------------------
@ -1268,7 +1268,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
* e | Float | single-precision float, little-endian byte order * e | Float | single-precision float, little-endian byte order
* G | Float | double-precision float, network (big-endian) byte order * G | Float | double-precision float, network (big-endian) byte order
* g | Float | single-precision float, network (big-endian) byte order * g | Float | single-precision float, network (big-endian) byte order
* *
* String | | * String | |
* Directive | Returns | Meaning * Directive | Returns | Meaning
* -------------------------------------------------------------- * --------------------------------------------------------------
@ -1285,7 +1285,7 @@ infected_str_new(const char *ptr, long len, VALUE str)
* | | base64 encoded string (RFC 4648) if followed by 0 * | | base64 encoded string (RFC 4648) if followed by 0
* P | String | pointer to a structure (fixed-length string) * P | String | pointer to a structure (fixed-length string)
* p | String | pointer to a null-terminated string * p | String | pointer to a null-terminated string
* *
* Misc. | | * Misc. | |
* Directive | Returns | Meaning * Directive | Returns | Meaning
* -------------------------------------------------------------- * --------------------------------------------------------------
@ -1554,7 +1554,7 @@ pack_unpack(VALUE str, VALUE fmt)
integer_size = QUAD_SIZE; integer_size = QUAD_SIZE;
bigendian_p = BIGENDIAN_P(); bigendian_p = BIGENDIAN_P();
goto unpack_integer; goto unpack_integer;
case 'Q': case 'Q':
signed_p = 0; signed_p = 0;
integer_size = QUAD_SIZE; integer_size = QUAD_SIZE;

2
proc.c
View file

@ -1332,7 +1332,7 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
* *
* Defines a singleton method in the receiver. The _method_ * Defines a singleton method in the receiver. The _method_
* parameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object. * parameter can be a +Proc+, a +Method+ or an +UnboundMethod+ object.
* If a block is specified, it is used as the method body. * If a block is specified, it is used as the method body.
* *
* class A * class A
* class << self * class << self

View file

@ -3725,7 +3725,7 @@ thread_reset_event_flags(rb_thread_t *th)
} }
static void static void
rb_threadptr_add_event_hook(rb_thread_t *th, rb_threadptr_add_event_hook(rb_thread_t *th,
rb_event_hook_func_t func, rb_event_flag_t events, VALUE data) rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
{ {
rb_event_hook_t *hook = alloc_event_hook(func, events, data); rb_event_hook_t *hook = alloc_event_hook(func, events, data);

24
time.c
View file

@ -131,7 +131,7 @@ static VALUE
mul(VALUE x, VALUE y) mul(VALUE x, VALUE y)
{ {
if (FIXNUM_P(x) && FIXNUM_P(y)) { if (FIXNUM_P(x) && FIXNUM_P(y)) {
#if HAVE_LONG_LONG && SIZEOF_LONG * 2 <= SIZEOF_LONG_LONG #if HAVE_LONG_LONG && SIZEOF_LONG * 2 <= SIZEOF_LONG_LONG
LONG_LONG ll = (LONG_LONG)FIX2LONG(x) * FIX2LONG(y); LONG_LONG ll = (LONG_LONG)FIX2LONG(x) * FIX2LONG(y);
if (FIXABLE(ll)) if (FIXABLE(ll))
return LONG2FIX(ll); return LONG2FIX(ll);
@ -1362,7 +1362,7 @@ static struct tm *localtime_with_gmtoff(const time_t *t, struct tm *result, long
* The year 2037 is not used because * The year 2037 is not used because
* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522949 * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522949
* *
* #!/usr/bin/ruby * #!/usr/bin/ruby
* *
* require 'date' * require 'date'
* *
@ -1373,8 +1373,8 @@ static struct tm *localtime_with_gmtoff(const time_t *t, struct tm *result, long
* d = Date.new(y,m,1) * d = Date.new(y,m,1)
* h[m] ||= {} * h[m] ||= {}
* h[m][d.wday] ||= y * h[m][d.wday] ||= y
* } * }
* } * }
* *
* 1.upto(12) {|m| * 1.upto(12) {|m|
* print "{" * print "{"
@ -1405,10 +1405,10 @@ static int compat_common_month_table[12][7] = {
/* /*
* compat_leap_month_table is generated by following program. * compat_leap_month_table is generated by following program.
* *
* #!/usr/bin/ruby * #!/usr/bin/ruby
* *
* require 'date' * require 'date'
* *
* h = {} * h = {}
* 2037.downto(2010) {|y| * 2037.downto(2010) {|y|
* 1.upto(12) {|m| * 1.upto(12) {|m|
@ -1418,7 +1418,7 @@ static int compat_common_month_table[12][7] = {
* h[m][d.wday] ||= y * h[m][d.wday] ||= y
* } * }
* } * }
* *
* 2.upto(2) {|m| * 2.upto(2) {|m|
* 0.upto(6) {|w| * 0.upto(6) {|w|
* y = h[m][w] * y = h[m][w]
@ -2145,7 +2145,7 @@ time_init_1(int argc, VALUE *argv, VALUE time)
* t1 = Time.new(2007,11,1,15,25,0, "+09:00") # JST (Narita) * t1 = Time.new(2007,11,1,15,25,0, "+09:00") # JST (Narita)
* t2 = Time.new(2007,11,1,12, 5,0, "-05:00") # CDT (Minneapolis) * t2 = Time.new(2007,11,1,12, 5,0, "-05:00") # CDT (Minneapolis)
* t3 = Time.new(2007,11,1,13,25,0, "-05:00") # CDT (Minneapolis) * t3 = Time.new(2007,11,1,13,25,0, "-05:00") # CDT (Minneapolis)
* t4 = Time.new(2007,11,1,16,53,0, "-04:00") # EDT (Charlotte) * t4 = Time.new(2007,11,1,16,53,0, "-04:00") # EDT (Charlotte)
* t5 = Time.new(2007,11,5, 9,24,0, "-05:00") # EST (Charlotte) * t5 = Time.new(2007,11,5, 9,24,0, "-05:00") # EST (Charlotte)
* t6 = Time.new(2007,11,5,11,21,0, "-05:00") # EST (Detroit) * t6 = Time.new(2007,11,5,11,21,0, "-05:00") # EST (Detroit)
* t7 = Time.new(2007,11,5,13,45,0, "-05:00") # EST (Detroit) * t7 = Time.new(2007,11,5,13,45,0, "-05:00") # EST (Detroit)
@ -3701,7 +3701,7 @@ rb_time_succ(VALUE time)
* p t.round(9).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z" * p t.round(9).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z"
* p t.round(10).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z" * p t.round(10).iso8601(10) #=> "2010-03-30T05:43:25.1234567890Z"
* *
* t = Time.utc(1999,12,31, 23,59,59) * t = Time.utc(1999,12,31, 23,59,59)
* p((t + 0.4).round.iso8601(3)) #=> "1999-12-31T23:59:59.000Z" * p((t + 0.4).round.iso8601(3)) #=> "1999-12-31T23:59:59.000Z"
* p((t + 0.49).round.iso8601(3)) #=> "1999-12-31T23:59:59.000Z" * p((t + 0.49).round.iso8601(3)) #=> "1999-12-31T23:59:59.000Z"
* p((t + 0.5).round.iso8601(3)) #=> "2000-01-01T00:00:00.000Z" * p((t + 0.5).round.iso8601(3)) #=> "2000-01-01T00:00:00.000Z"
@ -4258,13 +4258,13 @@ strftimev(const char *fmt, VALUE time)
* %C - Century (20 in 2009) * %C - Century (20 in 2009)
* %d - Day of the month (01..31) * %d - Day of the month (01..31)
* %D - Date (%m/%d/%y) * %D - Date (%m/%d/%y)
* %e - Day of the month, blank-padded ( 1..31) * %e - Day of the month, blank-padded ( 1..31)
* %F - Equivalent to %Y-%m-%d (the ISO 8601 date format) * %F - Equivalent to %Y-%m-%d (the ISO 8601 date format)
* %h - Equivalent to %b * %h - Equivalent to %b
* %H - Hour of the day, 24-hour clock (00..23) * %H - Hour of the day, 24-hour clock (00..23)
* %I - Hour of the day, 12-hour clock (01..12) * %I - Hour of the day, 12-hour clock (01..12)
* %j - Day of the year (001..366) * %j - Day of the year (001..366)
* %k - hour, 24-hour clock, blank-padded ( 0..23) * %k - hour, 24-hour clock, blank-padded ( 0..23)
* %l - hour, 12-hour clock, blank-padded ( 0..12) * %l - hour, 12-hour clock, blank-padded ( 0..12)
* %L - Millisecond of the second (000..999) * %L - Millisecond of the second (000..999)
* %m - Month of the year (01..12) * %m - Month of the year (01..12)

2
vm.c
View file

@ -397,7 +397,7 @@ collect_local_variables_in_iseq(rb_iseq_t *iseq, const VALUE ary)
static int static int
collect_local_variables_in_env(rb_env_t * env, const VALUE ary) collect_local_variables_in_env(rb_env_t * env, const VALUE ary)
{ {
while (collect_local_variables_in_iseq(env->block.iseq, ary), while (collect_local_variables_in_iseq(env->block.iseq, ary),
env->prev_envval) { env->prev_envval) {
GetEnvPtr(env->prev_envval, env); GetEnvPtr(env->prev_envval, env);

View file

@ -214,7 +214,7 @@ static inline int rb_method_call_status(rb_thread_t *th, rb_method_entry_t *me,
* \param mid an ID that represents the name of the method * \param mid an ID that represents the name of the method
* \param argc the number of method arguments * \param argc the number of method arguments
* \param argv a pointer to an array of method arguments * \param argv a pointer to an array of method arguments
* \param scope * \param scope
* \param self self in the caller. Qundef means the current control frame's self. * \param self self in the caller. Qundef means the current control frame's self.
* *
* \note \a self is used in order to controlling access to protected methods. * \note \a self is used in order to controlling access to protected methods.
@ -429,7 +429,7 @@ rb_method_call_status(rb_thread_t *th, rb_method_entry_t *me, call_type scope, V
* \param mid an ID that represents the name of the method * \param mid an ID that represents the name of the method
* \param argc the number of method arguments * \param argc the number of method arguments
* \param argv a pointer to an array of method arguments * \param argv a pointer to an array of method arguments
* \param scope * \param scope
*/ */
static inline VALUE static inline VALUE
rb_call(VALUE recv, ID mid, int argc, const VALUE *argv, call_type scope) rb_call(VALUE recv, ID mid, int argc, const VALUE *argv, call_type scope)

View file

@ -448,8 +448,8 @@ vm_method_missing(rb_thread_t *th, ID id, VALUE recv,
} }
static inline void static inline void
vm_setup_method(rb_thread_t *th, rb_control_frame_t *cfp, vm_setup_method(rb_thread_t *th, rb_control_frame_t *cfp,
VALUE recv, int argc, const rb_block_t *blockptr, VALUE flag, VALUE recv, int argc, const rb_block_t *blockptr, VALUE flag,
const rb_method_entry_t *me) const rb_method_entry_t *me)
{ {
int opt_pc, i; int opt_pc, i;

View file

@ -756,7 +756,7 @@ rb_mod_method_defined(VALUE mod, VALUE mid)
return Qfalse; return Qfalse;
} }
return Qtrue; return Qtrue;
} }
#define VISI_CHECK(x,f) (((x)&NOEX_MASK) == (f)) #define VISI_CHECK(x,f) (((x)&NOEX_MASK) == (f))

View file

@ -37,7 +37,7 @@
* paragraph 3 above is now null and void. * paragraph 3 above is now null and void.
*/ */
/* SNPRINTF.C /* SNPRINTF.C
* fjc 7-31-97 Modified by Mib Software to be a standalone snprintf.c module. * fjc 7-31-97 Modified by Mib Software to be a standalone snprintf.c module.
* http://www.mibsoftware.com * http://www.mibsoftware.com
* Mib Software does not warrant this software any differently than the * Mib Software does not warrant this software any differently than the
@ -50,7 +50,7 @@
* allow inclusion into libraries with less chance of namespace collisions. * allow inclusion into libraries with less chance of namespace collisions.
* *
* snprintf should be the only externally visible item. * snprintf should be the only externally visible item.
* *
* As of 7-31-97 FLOATING_POINT is NOT provided. The code is somewhat * As of 7-31-97 FLOATING_POINT is NOT provided. The code is somewhat
* non-portable, so it is disabled. * non-portable, so it is disabled.
*/ */
@ -84,7 +84,7 @@
# endif # endif
# include <varargs.h> # include <varargs.h>
#endif #endif
#ifndef _BSD_VA_LIST_ #ifndef _BSD_VA_LIST_
#define _BSD_VA_LIST_ va_list #define _BSD_VA_LIST_ va_list
#endif #endif
@ -408,7 +408,7 @@ BSD__uqtoa(register u_quad_t val, char *endp, int base, int octzero, const char
break; break;
default: /* oops */ default: /* oops */
/* /*
abort(); abort();
*/ */
break; /* fjc 7-31-97. Don't reference abort() here */ break; /* fjc 7-31-97. Don't reference abort() here */
@ -473,7 +473,7 @@ BSD__ultoa(register u_long val, char *endp, int base, int octzero, const char *x
break; break;
default: /* oops */ default: /* oops */
/* /*
abort(); abort();
*/ */
break; /* fjc 7-31-97. Don't reference abort() here */ break; /* fjc 7-31-97. Don't reference abort() here */
@ -824,7 +824,7 @@ fp_begin: _double = va_arg(ap, double);
ch = (ch == 'g') ? 'e' : 'E'; ch = (ch == 'g') ? 'e' : 'E';
else else
ch = 'g'; ch = 'g';
} }
if (ch == 'a' || ch == 'A') { if (ch == 'a' || ch == 'A') {
--expt; --expt;
expsize = exponent(expstr, expt, ch + 'p' - 'a'); expsize = exponent(expstr, expt, ch + 'p' - 'a');