aboutsummaryrefslogtreecommitdiffstats
path: root/ext/stringio
Commit message (Collapse)AuthorAgeFilesLines
* * ext/stringio/stringio.c (strio_sysread): StringIO.new.sysread didn'takr2003-12-281-1/+1
| | | | | | | raise EOFError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): clear the buffer argumentnobu2003-12-241-0/+2
| | | | | | | | | | when returning nil. [ruby-dev:22363] * test/ruby/ut_eof.rb (TestEOF::test_eof_0, TestEOF::test_eof_1): add buffer argument tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): never return nil atnobu2003-12-241-4/+22
| | | | | | | | | | unlimited read. [ruby-dev:22334] * ext/stringio/stringio.c (strio_read): support second argument. [ruby-dev:22350] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): set EOF flag at short read.nobu2003-12-101-5/+9
| | | | | | | [ruby-dev:22223], [ruby-dev:22224] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): do not set EOF flag whennobu2003-12-101-3/+4
| | | | | | | requested length is zero. [ruby-dev:22214] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): adjust behavior at readingnobu2003-12-101-0/+1
| | | | | | | | | | | | | beyond EOF to IO. [ruby-dev:22205] * test/ruby/ut_eof.rb (TestEOF::Seek): test behaviors at reading beyond EOF. * test/ruby/test_file.rb, * test/stringio/test_stringio.rb: include TestEOF::Seek test case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): follow IO#read.nobu2003-12-051-2/+4
| | | | | | | | * test/ruby/ut_eof.rb, test/ruby/test_file.rb, test/ruby/test_pipe.rb, test/stringio/test_stringio.rb: add EOF test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/stringio/test_stringio.rb: imported from [ruby-dev:21941].nobu2003-11-181-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): behave as IO at empty string.nobu2003-11-181-6/+27
| | | | | | | | | | | | [ruby-dev:21939] * ext/stringio/stringio.c (strio_getc, strio_getline): set EOF flag. * ext/stringio/stringio.c (strio_rewind, strio_seek, strio_ungetc): clear EOF flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_set_string, strio_reopen): checknobu2003-11-061-6/+7
| | | | | | | | | | | | | | | tainted. * ext/stringio/stringio.c (strio_copy, strio_ungetc, strio_write, strio_putc): add infection. * ext/stringio/stringio.c (strio_path): just nil. [ruby-dev:21846] * ruby.c (proc_options): reserve searched script path in the source file name table. [ruby-list:38765] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_atfork): wrong format specifier.matz2003-09-291-1/+1
| | | | | | | | | [ruby-dev:21428] * process.c (pst_inspect): better description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_gets): only "gets" should set $_.matz2003-07-281-7/+9
| | | | | | | | | | | | | | | | | | | | | | | * ext/stringio/stringio.c (strio_getline): should not set $_ here. * io.c (argf_to_s): argf.to_s returns "ARGF". * io.c (set_defout_var, set_deferr_var): make $defout and $deferr obsolete. * io.c (set_input_var, set_output_var): allow $stdin, $stdout, $stderr not to be instance of IO. * io.c (rb_f_readline): forward method to current_file. gets, readline, readlines, getc, readchar, tell, seek, pos=, rewind, fileno, to_io, eof, each_line, each_byte, binmode, and closed? as well. * io.c (argf_forward): utility function to forward method to current_file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c: includes Enumerable as well as IO.nobu2003-07-261-0/+2
| | | | | | | [ruby-talk:77058] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_disable_super, rb_enable_super): deprecate.matz2003-07-161-1/+0
| | | | | | | | | * eval.c (thgroup_s_alloc): re-implement group struct. * eval.c (thgroup_add): add check for enclose and frozen status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* -Wall cleanups (removed unused vars, no 'code has no effect' warnings)michal2003-01-161-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c,nobu2002-12-201-1/+1
| | | | | | | | | | ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c, ext/stringio/stringio.c, ext/strscan/strscan.c, ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c: use rb_define_alloc_func(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_base_copy): renamed "become".nobu2002-12-111-3/+3
| | | | | | | * ext/stringio/stringio.c (strio_copy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_set_string): reinitializenobu2002-09-091-11/+25
| | | | | | | | | | | | properly. * ext/stringio/stringio.c (strio_become): added self-assign check and experimental auto-conversion to StringIO. * ext/stringio/stringio.c (strio_reopen): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: modify program_prefix only if specifiedeban2002-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | --program-prefix. * configure.in: don't generate ext/extmk.rb. * Makefile.in: execute directly $(srcdir)/ext/extmk.rb. remove -Cext option, "Dir::chdir 'ext'" in ext/extmk.rb. * {win32,bccwin32}/Makefile.sub: ditto. * instruby.rb: ditto. * ext/extmk.rb: renamed from ext/extmk.rb.in. * lib/mkmf.rb (module Logging): create log files (mkmf.log) in each extension module directories. * ext/extmk.rb: ditto. * lib/mkmf.rb (macro_defined?): new method. * ext/.cvsignore: remove extmk.rb. * ext/*/.cvsignore: add "*.def". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c (rb_copy_generic_ivar): remove old generic instancematz2002-09-031-9/+11
| | | | | | | | | | variable table if it existes. * class.c (rb_make_metaclass): metaclass of a metaclass is a metaclass itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_initialize): RSTRING(mode)->ptrnobu2002-08-281-6/+17
| | | | | | | | | can be NULL. * ext/stringio/stringio.c (strio_ungetc): fix buffer overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_gets_internal): fixed for recordnobu2002-07-111-2/+2
| | | | | | | separator longer than 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_mark): must check if ptr is NULLnobu2002-04-231-2/+3
| | | | | | | | | | first. [ruby-talk:38873] * lib/mkmf.rb (create_makefile): should print depend file when make is other than nmake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* copied from ext/etc.nobu2002-04-181-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (check_modifiable): performancenobu2002-04-091-4/+15
| | | | | | | | | | | | | | improvement. avoid calling rb_str_modify() twice. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/stringio/stringio.c (strio_putc): ditto. * ext/stringio/stringio.c (strio_write): ditto, and use rb_str_cat() as possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (check_modifiable): wrong declaration.nobu2002-03-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest: add depend file.nobu2002-03-181-0/+1
| | | | | | | | | | | | | | | | | | | * ext/digest/md5: ditto. * ext/digest/rmd160: ditto. * ext/digest/sha1: ditto. * ext/digest/sha2: ditto. * ext/iconv/MANIFEST: ditto. * ext/stringio/MANIFEST: ditto. * ext/syslog: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_abort): should not bypass cleanup.nobu2002-03-181-1/+2
| | | | | | | * ext/stringio/stringio.c (check_modifiable): void function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/depend: added.nobu2002-03-171-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c: fixed frozen string bug. ungetc nonobu2002-03-141-14/+46
| | | | | | | longer raises on readonly stream unless modifies actually. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionnobu2002-03-112-0/+890
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionnobu2002-02-191-0/+19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e