summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2021-05-10Text files should end with a newlineNobuyoshi Nakada
2021-05-10Fix -Wundef warnings for patterns `#if HAVE`Benoit Daloze
* See [Feature #17752] * Using this to detect them: git grep -P 'if\s+HAVE' | grep -Pv 'HAVE_LONG_LONG|/ChangeLog|HAVE_TYPEOF'
2021-04-26Fix some typos [ci skip]Ryuta Kamizono
2021-02-06Merge pull request #470 from timgates42/bugfix_typo_expressedHiroshi SHIBATA
docs: fix simple typo, expessed -> expressed
2020-12-23[ruby/psych] Make Ractor-ready.Marc-Andre Lafortune
Config is Ractor-local. Benchmarking reveals that using `Ractor.local_storage` for storing cache is similar to accessing a constant (~15% slower).
2020-12-21Strip trailing spaces [ci skip]Nobuyoshi Nakada
2020-12-18docs: fix simple typo, expessed -> expressedTim Gates
There is a small typo in ext/psych/yaml/yaml.h. Should read `expressed` rather than `expessed`.
2020-07-16Remove private_iv_getCharles Oliver Nutter
The only remaining use of this function was to get the internal message object from an exception's hidden `mesg` instance variable to allow it to be dumped wiithout converting to a string. As discussed in #103, this exposes internal implementation details of CRuby, and ultimately does not provide any real utility to the user since they can't directly inspect this hidden variable. The test change here is to reflect CRuby behavior that denies equality if the internal message objects do not match, as is the case after the exception has been loaded and now has a simple String value. The impact to users is that exceptions with special hidden message objects will convert those objects to String during marshaling through YAML. I believe this only affects NameError and its descendants, since users can't set this field directly on their own exception types. Fixes #103.
2020-06-23Bump version strings for header fileHiroshi SHIBATA
2020-06-23Bump libyaml version to 0.2.5Hiroshi SHIBATA
2020-06-05Suppress -Wshorten-64-to-32 warningsNobuyoshi Nakada
ruby/ruby@d8720eb7de9cd9d874b621f214c27022e17cc941
2020-06-05ext/psych/extconf.rb: braced VPATH is for nmake onlyNobuyoshi Nakada
ruby/ruby@75b644350a80bc31449b7cee741d309643dc27e1
2020-06-05Nmake needs `VPATH`Nobuyoshi Nakada
ruby/ruby@a593186a02714cb92ae2748c2b7c46a6c50b0977
2020-06-05Add dependency on bundled yaml.h when usingNobuyoshi Nakada
ruby/ruby@98006cea4fd517671dae508fade13203bc18301a
2020-01-08Check for SnakeYAML version to confirm it's 1.21+Charles Oliver Nutter
Fixes #428
2019-11-12ext/psych/yaml/api.c: Suppress a "variable set but not used" warningYusuke Endoh
``` compiling ../.././ext/psych/yaml/api.c ../.././ext/psych/yaml/api.c: In function 'yaml_document_delete': ../.././ext/psych/yaml/api.c:1122:7: warning: variable 'context' set but not used [-Wunused-but-set-variable] } context; ^~~~~~~ ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-master/log/20190824T093004Z.log.html.gz
2019-10-21Remove 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. I'm not sure if the untaint calls in deduplicate are still needed after the removal of tainting in the parser. If they are not needed, they should be removed.
2019-08-05ext/psych/yaml/loader.c: Cast the difference of pointers to intYusuke Endoh
instead of casting a pointer to int. Follow up of 39622232c7542d062f79277a11f6b8b6b6cfd994.
2019-08-05Suppress warnings of bundled libyaml.Hiroshi SHIBATA
2019-08-05yaml few build warning fixesDavid Carlier
Closes: https://github.com/ruby/ruby/pull/2283
2019-07-25Get rid of C90 featureNobuyoshi Nakada
For ruby 2.6 and earlier. https://travis-ci.org/ruby/psych/jobs/562435717#L245-L248 ``` ../../../../ext/psych/psych_parser.c: In function ‘make_exception’: ../../../../ext/psych/psych_parser.c:87:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] VALUE ePsychSyntaxError = rb_const_get(mPsych, rb_intern("SyntaxError")); ^ ```
2019-06-01Make psych.so deterministicJeremy Evans
Fixes Ruby Bug #15890
2019-04-23syntax error can move, so do not cacheAaron Patterson
2018-10-19Move Java sources under proper package structure.Charles Oliver Nutter
2018-10-19Properly map Psych flow styles to SnakeYAML flow styles.Charles Oliver Nutter
2018-10-11Fix NPE in initialization of PsychEmitter.Charles Oliver Nutter
2018-09-19Update to SnakeYAML 1.23.Charles Oliver Nutter
2018-08-10bump version to 0.2.1SHIBATA Hiroshi
2018-08-10Re-apply patchsets from ruby-core repository.SHIBATA Hiroshi
2018-08-10Port from libyaml-0.2.1SHIBATA Hiroshi
2018-04-27Correct doc typo "achor" should be "anchor"utilum
2018-04-16Update to SnakeYAML 1.21 to fix jruby/jruby#5098.Charles Oliver Nutter
This will be released in Psych 3.0.3. See #352.
2018-04-16Support SNAPSHOT builds of snakeyaml.Charles Oliver Nutter
2018-02-22no ID cache in Init functionsnobu
Init functions are called only once, cache is useless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-26Removed stale .gitignore file [ci skip]Nobuyoshi Nakada
Its contents do not match existing files, and same name files in yaml directory are under the version control.
2017-11-27Picked r60919SHIBATA Hiroshi
https://github.com/ruby/ruby/commit/2d9f20e1cfdc7532a8acef4da9b8b7a788c4e99a
2017-11-27Merge commits from ruby core repository.SHIBATA Hiroshi
* https://github.com/ruby/ruby/commit/1852b4a8660ee8e71997f81cee4903c6eb23f306 * https://github.com/ruby/ruby/commit/c70f12c288cec94d3a7079ee3ffac3ee606d29ff * https://github.com/ruby/ruby/commit/4911d45648d03a519a3c93ca04649705a10fe149 * https://github.com/ruby/ruby/commit/af14720f749ea0274cadd4fa0329b86567ae0057 * https://github.com/ruby/ruby/commit/e3b4cd38dfe6df2545bf7a3dee01f9b4a78e94d0 * https://github.com/ruby/ruby/commit/1493972e8234cd5d57881d2353d153aa7cd67e72 * https://github.com/ruby/ruby/commit/208d2a95f5cceeeec0f619e4700bb6971e41f677 * https://github.com/ruby/ruby/commit/865decb508e89960382fc41d239be3e42545b68a
2017-09-10Merge pull request #326 from asterite/feature/scalar_locationAaron Patterson
Add Psych::Handler#event_location
2017-09-05Parse.load with an IO/File which has a non-YAML allowed encoding will justThomas E. Enebo
set the encoding to UTF-8 and hope for the best. This appears to be how libyaml works. This issue was noticed in yaml/store because it extends pstore which will create an IO in read_only mode as: ```ruby RD_ACCESS = {mode: IO::RDONLY | IO::BINARY, encoding: Encoding::ASCII_8BIT} ``` The data in the test case I was debugging was in fact UTF-8 data and MRI was happy to take this 8bit IO and pretend it is UTF-8. Form-fitting ftw.
2017-08-02Add Psych::Handler#event_locationAry Borenszweig
This adds a new reported event to Psych::Handler, event_location, with precise start/end line/column information. The line/column information provided by Psych::Parser#mark is not very useful because it points to the location past the event.
2017-06-19make frozen_string_literal: trueSHIBATA Hiroshi
2017-05-31Fall back on UTF-8 when an IO-like object's Charset isn't found.Charles Oliver Nutter
Fixes #319.
2017-03-21Typo fix in scanner.cbrchristian
2017-02-24Treat negative or zero-width as max possible width.Charles Oliver Nutter
Not sure why snakeyaml doesn't follow libyaml here. I'll follow up with them.
2017-02-08Fix typosSHIBATA Hiroshi
2016-12-13Revert "Partly reverted build error introduced ↵Charles Oliver Nutter
146a637e2205b2b36a6fa83fc0c6f7ce0c74e123." This reverts commit f5455216532f33e2b32bb035d14d820d1d37906b.
2016-11-29Partly reverted build error introduced 146a637e2205b2b36a6fa83fc0c6f7ce0c74e123.SHIBATA Hiroshi
2016-11-29Removed HAVE_RUBY_ENCODING_HSHIBATA Hiroshi
2016-11-17Update to snakeyaml 1.17.Charles Oliver Nutter
I had to hard-code two places that referenced a constant under Psych because neither the Rakefile nor a "gem build" loads that file. It was picking up the older version in my current JRuby process.
2016-11-16Make Psych::Emitter store the IO object in an instance variableKazuki Yamaguchi
The IO object given to Psych::Emitter#initialize is saved inside LibYAML, yaml_emitter_t. This is a problem because Ruby's GC marker can't find it, and can lead to use after free. So, store the IO object in an instance variable and fetch from it every time the write handler is called. The segmentation fault can be reproduced with the following snippet: emitter = Psych::Emitter.new(open("/dev/null", "w")) GC.start emitter.start_stream(Psych::Parser::UTF16BE) # make it write something emitter.end_stream