mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/stringio/stringio.c (ungetc): RDoc updated. trunk allows
pushing back behind the beginning of the pseudo stream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d5e1b514f9
commit
39802186b2
3 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Dec 4 13:10:23 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||
|
||||
* ext/stringio/stringio.c (ungetc): RDoc updated. trunk allows
|
||||
pushing back behind the beginning of the pseudo stream.
|
||||
|
||||
Fri Dec 4 03:10:38 2009 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* compile.c (compile_cpath, iseq_compile_each): reverted
|
||||
|
|
|
@ -696,10 +696,9 @@ strio_extend(struct StringIO *ptr, long pos, long len)
|
|||
* strio.ungetc(string) -> nil
|
||||
*
|
||||
* Pushes back one character (passed as a parameter) onto *strio*
|
||||
* such that a subsequent buffered read will return it. Pushing back
|
||||
* behind the beginning of the buffer string is not possible. Nothing
|
||||
* will be done if such an attempt is made.
|
||||
* In other case, there is no limitation for multiple pushbacks.
|
||||
* such that a subsequent buffered read will return it. There is no
|
||||
* limitation for multiple pushbacks including pushing back behind the
|
||||
* beginning of the buffer string.
|
||||
*/
|
||||
static VALUE
|
||||
strio_ungetc(VALUE self, VALUE c)
|
||||
|
|
|
@ -327,7 +327,7 @@ class TestStringIO < Test::Unit::TestCase
|
|||
s = "1234"
|
||||
f = StringIO.new(s, "r")
|
||||
assert_nothing_raised { f.ungetc("x") }
|
||||
assert_equal("x", f.getc) # bug?
|
||||
assert_equal("x", f.getc) # bug? -> it's a feature from 1.9.
|
||||
assert_equal("1", f.getc)
|
||||
|
||||
s = "1234"
|
||||
|
|
Loading…
Add table
Reference in a new issue