From 2c0701f65879cbf5d446362e49b2d6f5eeb9b0a6 Mon Sep 17 00:00:00 2001 From: matz Date: Sun, 30 Oct 2005 18:20:54 +0000 Subject: * ext/readline/readline.c (readline_readline): type check. [ruby-core:6089] * numeric.c (fix_rshift): RDoc fix. [ruby-core:6351] * util.h (strtod): add #undef for platforms defines strtod() macro. [ruby-dev:27563] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++++ ext/readline/readline.c | 6 ++++-- ext/syck/rubyext.c | 1 + numeric.c | 2 +- util.h | 1 + 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4b193a848..2b30aeef01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Mon Oct 31 03:19:36 2005 Yukihiro Matsumoto + + * ext/readline/readline.c (readline_readline): type check. + [ruby-core:6089] + + * numeric.c (fix_rshift): RDoc fix. [ruby-core:6351] + + * util.h (strtod): add #undef for platforms defines strtod() + macro. [ruby-dev:27563] + Mon Oct 31 02:35:59 2005 Hirokazu Yamamoto * test/ruby/test_float.rb (test_precision): test by assert_in_delta. diff --git a/ext/readline/readline.c b/ext/readline/readline.c index b78a911b7c..aa481ad719 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -69,10 +69,12 @@ readline_readline(argc, argv, self) if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "stdin closed"); + Check_Type(rb_stdout, T_FILE); GetOpenFile(rb_stdout, ofp); - rl_outstream = ofp->f; + rl_outstream = GetWriteFile(ofp); + Check_Type(rb_stdin, T_FILE); GetOpenFile(rb_stdin, ifp); - rl_instream = ifp->f; + rl_instream = GetReadFile(ifp); buff = (char*)rb_protect((VALUE(*)_((VALUE)))readline, (VALUE)prompt, &status); if (status) { diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c index 6ae73a9714..ac0401ff9c 100644 --- a/ext/syck/rubyext.c +++ b/ext/syck/rubyext.c @@ -770,6 +770,7 @@ syck_parser_initialize(argc, argv, self) Check_Type(options, T_HASH); } rb_ivar_set(self, s_options, options); + rb_ivar_set(self, s_input, Qnil); return self; } diff --git a/numeric.c b/numeric.c index ca61ebdb41..0f2cfd9f9e 100644 --- a/numeric.c +++ b/numeric.c @@ -2457,7 +2457,7 @@ fix_lshift(x, y) * call-seq: * fix >> count => integer * - * Shifts _fix_ left _count_ positions (right if _count_ is negative). + * Shifts _fix_ right _count_ positions (left if _count_ is negative). */ static VALUE diff --git a/util.h b/util.h index ca879cab5e..b00c096dec 100644 --- a/util.h +++ b/util.h @@ -61,6 +61,7 @@ char *ruby_getcwd _((void)); #define my_getcwd() ruby_getcwd() double ruby_strtod _((const char*, char **)); +#undef strtod #define strtod(s,e) ruby_strtod(s,e) #endif /* UTIL_H */ -- cgit v1.2.3