Age | Commit message (Collapse) | Author |
|
|
|
docs: fix simple typo, expessed -> expressed
|
|
Config is Ractor-local.
Benchmarking reveals that using `Ractor.local_storage` for storing cache
is similar to accessing a constant (~15% slower).
|
|
|
|
There is a small typo in ext/psych/yaml/yaml.h.
Should read `expressed` rather than `expessed`.
|
|
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.
|
|
|
|
|
|
ruby/ruby@d8720eb7de9cd9d874b621f214c27022e17cc941
|
|
ruby/ruby@75b644350a80bc31449b7cee741d309643dc27e1
|
|
ruby/ruby@a593186a02714cb92ae2748c2b7c46a6c50b0977
|
|
ruby/ruby@98006cea4fd517671dae508fade13203bc18301a
|
|
Fixes #428
|
|
```
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
|
|
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.
|
|
instead of casting a pointer to int.
Follow up of 39622232c7542d062f79277a11f6b8b6b6cfd994.
|
|
|
|
Closes: https://github.com/ruby/ruby/pull/2283
|
|
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"));
^
```
|
|
Fixes Ruby Bug #15890
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This will be released in Psych 3.0.3. See #352.
|
|
|
|
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
|
|
Its contents do not match existing files, and same name files
in yaml directory are under the version control.
|
|
https://github.com/ruby/ruby/commit/2d9f20e1cfdc7532a8acef4da9b8b7a788c4e99a
|
|
* 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
|
|
Add Psych::Handler#event_location
|
|
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.
|
|
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.
|
|
|
|
Fixes #319.
|
|
|
|
Not sure why snakeyaml doesn't follow libyaml here. I'll follow
up with them.
|
|
|
|
146a637e2205b2b36a6fa83fc0c6f7ce0c74e123."
This reverts commit f5455216532f33e2b32bb035d14d820d1d37906b.
|
|
|
|
|
|
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.
|
|
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
|
|
|
|
|