aboutsummaryrefslogtreecommitdiffstats
path: root/ext/stringio
Commit message (Collapse)AuthorAgeFilesLines
* delete deprecated IO-like methods卜部昌平2020-12-031-52/+0
| | | | | | | | | This commit deletes {IO,ARGF,StringIO,Zib::GZipReader}#{bytes,chars,lines,codepoints}, which have been deprecated since c47c095b9740e7c19d6fdca29ab661c1089221d4. Note that String also has those methods. They are neither depreacted nor deleted because they are not aliases of counterpart each_something.
* [ruby/stringio] Bump version to 0.1.4Nobuyoshi Nakada2020-08-271-1/+1
| | | | https://github.com/ruby/stringio/commit/64f2360d38
* [stringio] fix stringio codepoint enumerator off by one errorYoann Lecuyer2020-08-271-1/+1
|
* sed -i '/rmodule.h/d'卜部昌平2020-08-271-1/+0
|
* sed -i '/r_cast.h/d'卜部昌平2020-08-271-1/+0
|
* sed -i '\,2/extern.h,d'卜部昌平2020-08-271-1/+0
|
* Update the license for the default gems to dual licensesHiroshi SHIBATA2020-08-181-1/+1
|
* [ruby/stringio] Bump version to 0.1.3Nobuyoshi Nakada2020-07-201-1/+1
| | | | https://github.com/ruby/stringio/commit/376516cd2d
* [ruby/stringio] No compatibility check in US-ASCII caseNobuyoshi Nakada2020-07-201-2/+3
| | | | https://github.com/ruby/stringio/commit/59df1c8293
* [ruby/stringio] Removed wrong UNREACHABLENobuyoshi Nakada2020-07-201-1/+0
| | | | https://github.com/ruby/stringio/commit/f528538d10
* [ruby/stringio] Bump version to 0.1.2Nobuyoshi Nakada2020-07-201-1/+1
| | | | https://github.com/ruby/stringio/commit/8cbe3f7397
* [ruby/stringio] Raise an error if encoding conversion not succeededNobuyoshi Nakada2020-07-201-1/+6
| | | | | | | | | | As `rb_str_conv_enc()` returns the argument string object itself unchanged when any conversion failed, check the incompatibility in that case. Fixes https://github.com/ruby/stringio/issues/13 https://github.com/ruby/stringio/commit/ede6bdcc71
* Removed nonsense `rubygems_version` in input gemspec filesNobuyoshi Nakada2020-06-251-1/+0
| | | | | As it is ignored and set at building packages automatically, it is just nonsense to set in gemspec file for input.
* Suppress warnings no inline ruby debug (#3107)Kenta Murata2020-05-221-1/+2
| | | | | * Suppress unused warnings occurred due to -fno-inline * Suppress warning occurred due to RUBY_DEBUG=1
* sed -i 's|ruby/impl|ruby/internal|'卜部昌平2020-05-111-140/+140
| | | | To fix build failures.
* sed -i s|ruby/3|ruby/impl|g卜部昌平2020-05-111-140/+140
| | | | This shall fix compile errors.
* Merge pull request #2991 from shyouhei/ruby.h卜部昌平2020-04-081-0/+152
| | | Split ruby.h
* [ruby/stringio] Bump version to 0.1.1Nobuyoshi Nakada2020-03-151-1/+1
| | | | https://github.com/ruby/stringio/commit/05d75e5e66
* [ruby/stringio] StringIO#initialize default to the source string encodingJean Boussier2020-03-151-4/+6
| | | | | | [Bug #16497] https://github.com/ruby/stringio/commit/4958a5ccab
* [ruby/stringio] Bump version to 0.1.0Hiroshi SHIBATA2019-11-301-1/+1
| | | | https://github.com/ruby/stringio/commit/4c1e267e1a
* [ruby/stringio] RbConfig::LIMITS only provide after Ruby 2.5Hiroshi SHIBATA2019-11-301-1/+1
| | | | https://github.com/ruby/stringio/commit/1fed3aacd3
* [ruby/stringio] Remove taint supportJeremy Evans2019-10-311-4/+0
| | | | | | | | Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/stringio/commit/60ee9ccd95
* Update StringIO docs:zverok2019-10-261-41/+56
| | | | | | | | | | | * More explanations/examples in class docs; * Fix links to other methods (remove <code> tag); * Fix wording of method docs (remove *stringio* receiver name, as it is not rendered by modern RDoc); * Add option mention to linereading methods (added in 2.4); * Several other small fixes.
* [ruby/stringio] Bump up the versionNobuyoshi Nakada2019-09-291-1/+1
| | | | https://github.com/ruby/stringio/commit/f0e5027279
* [ruby/stringio] Use rb_funcallv_kw when delegating argumentsNobuyoshi Nakada2019-09-291-2/+7
| | | | https://github.com/ruby/stringio/commit/5892663e32
* [ruby/stringio] Replaced rb_funcall2 with rb_funcallvNobuyoshi Nakada2019-09-291-4/+4
| | | | https://github.com/ruby/stringio/commit/a37ab7c419
* [ruby/stringio] Dropped older ruby versionsNobuyoshi Nakada2019-09-291-1/+1
| | | | https://github.com/ruby/stringio/commit/e8065153b8
* [ruby/stringio] Get rid of String#undump for ruby 2.4 or earlierNobuyoshi Nakada2019-09-291-1/+1
| | | | https://github.com/ruby/stringio/commit/4dfd997e0a
* Make rb_scan_args handle keywords more similar to Ruby methods (#2460)Jeremy Evans2019-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cfuncs that use rb_scan_args with the : entry suffer similar keyword argument separation issues that Ruby methods suffer if the cfuncs accept optional or variable arguments. This makes the following changes to : handling. * Treats as **kw, prompting keyword argument separation warnings if called with a positional hash. * Do not look for an option hash if empty keywords are provided. For backwards compatibility, treat an empty keyword splat as a empty mandatory positional hash argument, but emit a a warning, as this behavior will be removed in Ruby 3. The argument number check needs to be moved lower so it can correctly handle an empty positional argument being added. * If the last argument is nil and it is necessary to treat it as an option hash in order to make sure all arguments are processed, continue to treat the last argument as the option hash. Emit a warning in this case, as this behavior will be removed in Ruby 3. * If splitting the keyword hash into two hashes, issue a warning, as we will not be splitting hashes in Ruby 3. * If the keyword argument is required to fill a mandatory positional argument, continue to do so, but emit a warning as this behavior will be going away in Ruby 3. * If keyword arguments are provided and the last argument is not a hash, that indicates something wrong. This can happen if a cfunc is calling rb_scan_args multiple times, and providing arguments that were not passed to it from Ruby. Callers need to switch to the new rb_scan_args_kw function, which allows passing of whether keywords were provided. This commit fixes all warnings caused by the changes above. It switches some function calls to *_kw versions with appropriate kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS is used. If creating new arguments, RB_PASS_KEYWORDS is used if the last argument is a hash to be treated as keywords. In open_key_args in io.c, use rb_scan_args_kw. In this case, the arguments provided come from another C function, not Ruby. The last argument may or may not be a hash, so we can't set keyword argument mode. However, if it is a hash, we don't want to warn when treating it as keywords. In Ruby files, make sure to appropriately use keyword splats or literal keywords when calling Cfuncs that now issue keyword argument separation warnings through rb_scan_args. Also, make sure not to pass nil in place of an option hash. Work around Kernel#warn warnings due to problems in the Rubygems override of the method. There is an open pull request to fix these issues in Rubygems, but part of the Rubygems tests for their override fail on ruby-head due to rb_scan_args not recognizing empty keyword splats, which this commit fixes. Implementation wise, adding rb_scan_args_kw is kind of a pain, because rb_scan_args takes a variable number of arguments. In order to not duplicate all the code, the function internals need to be split into two functions taking a va_list, and to avoid passing in a ton of arguments, a single struct argument is used to handle the variables previously local to the function.
* [ruby/stringio] Fixed a typoNobuyoshi Nakada2019-08-231-1/+1
| | | | | | https://github.com/ruby/stringio/commit/b249631c433f800c979be2705bf63555075db2fc#commitcomment-34804150 https://github.com/ruby/stringio/commit/998d6257fb
* [ruby/stringio] Supported BOMNobuyoshi Nakada2019-08-141-0/+81
| | | | https://github.com/ruby/stringio/commit/b249631c43
* [ruby/stringio] Supported `mode:` optionNobuyoshi Nakada2019-08-141-1/+20
| | | | https://github.com/ruby/stringio/commit/53def32ba0
* [ruby/stringio] Allow bignum modeNobuyoshi Nakada2019-08-141-2/+3
| | | | https://github.com/ruby/stringio/commit/d28927b561
* [ruby/stringio] Added support for older versionsNobuyoshi Nakada2019-08-142-0/+56
| | | | | https://github.com/ruby/stringio/commit/c4a13d41cd https://github.com/ruby/stringio/commit/359c9f395c
* [ruby/stringio] stringio: encoding supportNobuyoshi Nakada2019-08-141-27/+20
| | | | https://github.com/ruby/stringio/commit/7b20075ab0
* ext/stringio/stringio.c (strio_read): "binray" is always zero hereYusuke Endoh2019-07-151-1/+1
| | | | Remove unused conditional expression to suppress Coverity Scan warnings.
* Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada2019-07-141-0/+1
|
* Removed stub lines from gemspec filesNobuyoshi Nakada2019-07-131-2/+0
|
* C90 for old versionsNobuyoshi Nakada2019-07-101-14/+11
|
* Use the found version numberNobuyoshi Nakada2019-07-101-1/+1
|
* Removed useless `freeze`sNobuyoshi Nakada2019-07-101-13/+13
|
* Added StringIO::VERSIONNobuyoshi Nakada2019-07-102-1/+14
|
* Removed moving toplevel header since r12501nobu2019-02-081-1/+1
| | | | | | | Moving public headers was 12-years ago, no depend files would expect ruby.h in the top source directory now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use `&` instead of `modulo`nobu2019-01-151-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* setbyte / ungetbyte allow out-of-range integersshyouhei2019-01-151-26/+19
| | | | | | | | | | | | * string.c: String#setbyte to accept arbitrary integers [Bug #15460] * io.c: ditto for IO#ungetbyte * ext/strringio/stringio.c: ditto for StringIO#ungetbyte git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2019-01-091-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Follow behaviour of IO#ungetbytekazu2019-01-091-4/+15
| | | | | | see r65802 and [Bug #14359] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge stringio.gemspec from github repository.hsbt2018-11-281-3/+4
| | | | | | Temporary ignored configuration of certificate sign. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge stringio.gemspec from github repository.hsbt2018-10-221-2/+2
| | | | | | It fixed the wrong paths of libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed needless date attribute from gemspec of default gems.hsbt2018-08-071-1/+0
| | | | | | They are assigned automatically when pushing gem file to rubygems.org. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e