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

* rational.c (string_to_r_internal): use rb_isdigit.

* marshal.c (long_toobig): use %zd.

* ruby.c (set_arg0): move unused variable definition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-06-01 18:23:10 +00:00
parent 9256f94d9a
commit ccb61351ea
5 changed files with 18 additions and 11 deletions

View file

@ -1,3 +1,11 @@
Sun Jun 1 22:29:35 2008 NARUSE, Yui <naruse@ruby-lang.org>
* rational.c (string_to_r_internal): use rb_isdigit.
* marshal.c (long_toobig): use %zd.
* ruby.c (set_arg0): move unused variable definition.
Sun Jun 1 12:18:12 2008 NARUSE, Yui <naruse@ruby-lang.org>
* insns.def (DEFINE_INSN): subtract of pointers is ptrdiff_t.

View file

@ -937,7 +937,7 @@ r_byte(struct load_arg *arg)
static void
long_toobig(int size)
{
rb_raise(rb_eTypeError, "long too big for this architecture (size %d, given %d)",
rb_raise(rb_eTypeError, "long too big for this architecture (size %zd, given %d)",
sizeof(long), size);
}

View file

@ -1371,7 +1371,7 @@ string_to_r_internal(VALUE self)
VALUE l;
while (*p) {
if (isdigit(*p))
if (rb_isdigit(*p))
count++;
p++;
}

11
ruby.c
View file

@ -1357,7 +1357,7 @@ get_arglen(int argc, char **argv)
static void
set_arg0(VALUE val, ID id)
{
char *s, *t;
char *s;
long i;
if (origarg.argv == 0)
@ -1388,13 +1388,12 @@ set_arg0(VALUE val, ID id)
}
memcpy(origarg.argv[0], s, i);
t = origarg.argv[0] + i;
*t = '\0';
if (i + 1 < origarg.len) memset(t + 1, ' ', origarg.len - i - 1);
{
int j;
char *t = origarg.argv[0] + i;
*t = '\0';
if (i + 1 < origarg.len) memset(t + 1, ' ', origarg.len - i - 1);
for (j = 1; j < origarg.argc; j++) {
origarg.argv[j] = t;
}

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2008-06-01"
#define RUBY_RELEASE_DATE "2008-06-02"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20080601
#define RUBY_RELEASE_CODE 20080602
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 6
#define RUBY_RELEASE_DAY 1
#define RUBY_RELEASE_DAY 2
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];