path: root/ext/stringio
AgeCommit message (Collapse)Author
2020-12-22Removed rb_cData entityNobuyoshi Nakada
* Use the wrapper of rb_cObject instead of data access * Replaced rest of extentions * Updated the version guard for Data * Added the version guard of rb_cData Notes: Merged:
2020-12-18[stringio] Version 3.0.0Kenta Murata
2020-12-18[stringio] Add test-unit in the development dependenciesKenta Murata
2020-12-18[stringio] Make stringio Ractor safeKenta Murata
2020-12-03delete deprecated IO-like methods卜部昌平
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.
2020-08-27[ruby/stringio] Bump version to 0.1.4Nobuyoshi Nakada
2020-08-27[stringio] fix stringio codepoint enumerator off by one errorYoann Lecuyer
Notes: Merged:
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged:
2020-08-27sed -i '/r_cast.h/d'卜部昌平
Notes: Merged:
2020-08-27sed -i '\,2/extern.h,d'卜部昌平
Notes: Merged:
2020-08-18Update the license for the default gems to dual licensesHiroshi SHIBATA
2020-07-20[ruby/stringio] Bump version to 0.1.3Nobuyoshi Nakada Notes: Merged:
2020-07-20[ruby/stringio] No compatibility check in US-ASCII caseNobuyoshi Nakada Notes: Merged:
2020-07-20[ruby/stringio] Removed wrong UNREACHABLENobuyoshi Nakada Notes: Merged:
2020-07-20[ruby/stringio] Bump version to 0.1.2Nobuyoshi Nakada Notes: Merged:
2020-07-20[ruby/stringio] Raise an error if encoding conversion not succeededNobuyoshi Nakada
As `rb_str_conv_enc()` returns the argument string object itself unchanged when any conversion failed, check the incompatibility in that case. Fixes Notes: Merged:
2020-06-25Removed nonsense `rubygems_version` in input gemspec filesNobuyoshi Nakada
As it is ignored and set at building packages automatically, it is just nonsense to set in gemspec file for input.
2020-05-22Suppress warnings no inline ruby debug (#3107)Kenta Murata
* Suppress unused warnings occurred due to -fno-inline * Suppress warning occurred due to RUBY_DEBUG=1 Notes: Merged-By: mrkn <>
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged:
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged:
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <>
2020-03-15[ruby/stringio] Bump version to 0.1.1Nobuyoshi Nakada
2020-03-15[ruby/stringio] StringIO#initialize default to the source string encodingJean Boussier
[Bug #16497]
2019-11-30[ruby/stringio] Bump version to 0.1.0Hiroshi SHIBATA
2019-11-30[ruby/stringio] RbConfig::LIMITS only provide after Ruby 2.5Hiroshi SHIBATA
2019-10-31[ruby/stringio] Remove taint supportJeremy Evans
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.
2019-10-26Update StringIO docs:zverok
* 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. Notes: Merged:
2019-09-29[ruby/stringio] Bump up the versionNobuyoshi Nakada
2019-09-29[ruby/stringio] Use rb_funcallv_kw when delegating argumentsNobuyoshi Nakada
2019-09-29[ruby/stringio] Replaced rb_funcall2 with rb_funcallvNobuyoshi Nakada
2019-09-29[ruby/stringio] Dropped older ruby versionsNobuyoshi Nakada
2019-09-29[ruby/stringio] Get rid of String#undump for ruby 2.4 or earlierNobuyoshi Nakada
2019-09-25Make rb_scan_args handle keywords more similar to Ruby methods (#2460)Jeremy Evans
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. Notes: Merged-By: jeremyevans <>
2019-08-23[ruby/stringio] Fixed a typoNobuyoshi Nakada
2019-08-14[ruby/stringio] Supported BOMNobuyoshi Nakada
2019-08-14[ruby/stringio] Supported `mode:` optionNobuyoshi Nakada
2019-08-14[ruby/stringio] Allow bignum modeNobuyoshi Nakada
2019-08-14[ruby/stringio] Added support for older versionsNobuyoshi Nakada
2019-08-14[ruby/stringio] stringio: encoding supportNobuyoshi Nakada
2019-07-15ext/stringio/stringio.c (strio_read): "binray" is always zero hereYusuke Endoh
Remove unused conditional expression to suppress Coverity Scan warnings.
2019-07-14Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada
2019-07-13Removed stub lines from gemspec filesNobuyoshi Nakada
2019-07-10C90 for old versionsNobuyoshi Nakada
2019-07-10Use the found version numberNobuyoshi Nakada
2019-07-10Removed useless `freeze`sNobuyoshi Nakada
2019-07-10Added StringIO::VERSIONNobuyoshi Nakada
2019-02-08Removed moving toplevel header since r12501nobu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15Use `&` instead of `modulo`nobu
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-15setbyte / ungetbyte allow out-of-range integersshyouhei
* 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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-09* expand tabs.svn
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e