summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 08:36:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-25 08:36:46 +0000
commitce60bbc8519465a125f975f4169f0bb644fcadf3 (patch)
tree63e3c3a02457640466320791edac1a0b5cc19e42 /ruby.c
parent10906176b4dea0444588fba36b98f4b144a25775 (diff)
* include/ruby/intern.h (rb_io_ungetbyte): added prototype.
* io.c (rb_io_gets): use rb_io_getline_1 for unget buffer. * ruby.c (load_file): use rb_io_ungetbyte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ruby.c b/ruby.c
index 25d95901e7..5a51bbb52a 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1260,12 +1260,12 @@ load_file(VALUE parser, const char *fname, int script, struct cmdline_options *o
}
/* push back shebang for pragma may exist in next line */
- rb_io_ungetc(f, rb_str_new2("!\n"));
+ rb_io_ungetbyte(f, rb_str_new2("!\n"));
}
else if (!NIL_P(c)) {
- rb_io_ungetc(f, c);
+ rb_io_ungetbyte(f, c);
}
- rb_io_ungetc(f, INT2FIX('#'));
+ rb_io_ungetbyte(f, INT2FIX('#'));
if (no_src_enc && opt->src.enc.name) {
opt->src.enc.index = opt_enc_index(opt->src.enc.name);
src_encoding_index = opt->src.enc.index;
@@ -1275,7 +1275,7 @@ load_file(VALUE parser, const char *fname, int script, struct cmdline_options *o
}
}
else if (!NIL_P(c)) {
- rb_io_ungetc(f, c);
+ rb_io_ungetbyte(f, c);
}
require_libraries(opt); /* Why here? unnatural */
}