summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into expose_load_settingsCharles Oliver Nutter2023-01-263-56/+83
|\
| * Merge pull request #612 from headius/snakeyaml_engineAaron Patterson2023-01-204-267/+313
| |\ | | | | | | Move JRuby extension to SnakeYAML Engine
| | * Minor tweaks and cleanup in emitterCharles Oliver Nutter2023-01-181-11/+9
| | |
| | * Shorter path to encode strings in emitterCharles Oliver Nutter2023-01-181-1/+4
| | |
| | * Misc cleanupCharles Oliver Nutter2023-01-181-31/+45
| | |
| | * Reduce hops to call sitesCharles Oliver Nutter2023-01-181-13/+25
| | | | | | | | | | | | | | | If we could embed indy call sites here they would cache as constants; this is the best we can do at the moment.
| * | configure of libyaml couldn't detect "arm64-apple-darwin22" for build host.Hiroshi SHIBATA2023-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | checking whether make sets $(MAKE)... (cached) yes checking build system type... arm-apple-darwin21.6.0 checking host system type... Invalid configuration `arm64-apple-darwin21': machine `arm64-apple' not recognized configure: error: /bin/sh /Users/hsbt/Downloads/yaml-0.2.5/config/config.sub arm64-apple-darwin21 failed *** extconf.rb failed ***
* | | Expose a few key LoadSettings valuesCharles Oliver Nutter2023-01-131-0/+49
| |/ |/| | | | | | | | | | | These values are often set to mitigate DOS attacks, so we want to expose them for JRuby users. See #579
* | Fix up spec version handlingCharles Oliver Nutter2023-01-132-7/+13
| |
* | Omit specc version from document startCharles Oliver Nutter2023-01-131-2/+1
| | | | | | | | | | | | This eliminates the %YAML 1.2 directive at the start of each emit, which improves tests passing but also breaks a few tests that *expect* the YAML directive to be present.
* | Initial move to SnakeYAML EngineCharles Oliver Nutter2023-01-134-223/+237
|/ | | | | | | | | | | | | | | See jruby/jruby#7570 for some of the justification for this move. We only require the parser from SnakeYAML, but in the original form it is encumbered with Java object serialization code that keeps getting flagged as a CVE risk. We disagree with the assessment, at least as it pertains to JRuby (we do not use the code in question) but our inclusion of the library continues to get flagged by auditing tools. This commit starts the process of moving to the successor library, SnakeYAML Engine. The parser API is largely unchanged, except as seen in this commit. No Java exceptions are thrown, but a number of Psych tests fail (possibly due to Engine being YAML 1.2 only).
* Minor cleanup of emitter code.Charles Oliver Nutter2023-01-121-6/+9
|
* Remove redundant init of YAMLTreeCharles Oliver Nutter2023-01-122-48/+0
| | | | | This used to house a method for getting private instance vars but that was removed in #458. Now this does nothing.
* Clean up importsCharles Oliver Nutter2023-01-121-3/+0
|
* Use inline caching for calls to handlerCharles Oliver Nutter2023-01-121-20/+42
|
* Clean up reader creationCharles Oliver Nutter2023-01-121-29/+35
| | | | | | * Skip "read" respondTo check for natural RubyIO * Remove duplicate malformed input reporting set * Flip some logic to simplify
* Remove unused yaml argumentCharles Oliver Nutter2023-01-121-9/+8
|
* Remove taintingCharles Oliver Nutter2023-01-121-23/+21
|
* Use method reference for allocatorCharles Oliver Nutter2023-01-122-10/+2
|
* Remove unused loggerCharles Oliver Nutter2023-01-121-2/+0
|
* Fix missing `abort` callNobuyoshi Nakada2022-10-121-1/+1
| | | Co-authored-by: Olle Jonsson <olle.jonsson@gmail.com>
* Abandon when libyaml is not foundNobuyoshi Nakada2022-10-121-8/+5
|
* Removed the related condition of --enable-bundled-libyamlHiroshi SHIBATA2022-10-071-6/+1
|
* --enable-bundled-libyaml config has been removedHiroshi SHIBATA2022-10-071-1/+1
|
* Removed the related files for downloading with extlibsHiroshi SHIBATA2022-10-051-17/+0
|
* No longer bundle external library sourcesNobuyoshi Nakada2022-10-051-11/+0
|
* Unbreak JRuby ext parse methodCharles Oliver Nutter2022-09-191-11/+2
| | | | | | The changes in #580 renamed the native parse method and changed its signature to be fixed-arity with three arguments. This patch makes the same change to the JRuby extension to unbreak it.
* Merge pull request #580 from ruby/more-rubyAaron Patterson2022-09-191-20/+2
|\ | | | | Convert some of Parser#parse to Ruby
| * Convert some of Parser#parse to RubyAaron Patterson2022-09-151-20/+2
| | | | | | | | This commit just converts some of the parse method to Ruby
* | Merge pull request #526 from khanderson/masterAaron Patterson2022-07-141-13/+17
|\ \ | |/ |/| Fix infinite loop bug after YAML_MEMORY_ERROR (psych issue #440)
| * Fix infinite loop bug after YAML_MEMORY_ERROR (psych issue #440)Karl Anderson2022-05-131-13/+17
| |
* | Fix libyaml download failure rescue under minirubyAlan Wu2022-06-141-7/+9
|/ | | | | | | | | | | | | | | | | | | | I tried to build Ruby on a system without libyaml today and realized that my attempt from <https://github.com/ruby/psych/pull/557> doesn't fix the error in <https://github.com/ruby/psych/issues/552>. I still got the same `LoadError` from `digest` which stopped the build. Since `LoadError` is not a `StandardError`, a plain `rescue` doesn't catch it. Catch `LoadError` explicitly instead and reduce the scope of the `begin` block. I tested this change in a Ruby build on macOS without libyaml installed and confirmed that `make` continues with a warning instead of aborting: *** Following extensions are not compiled: psych: Could not be configured. It will not be installed. ... This should address <https://bugs.ruby-lang.org/issues/18790>.
* Update autoconf files bundled with yaml-2.5Nobuyoshi Nakada2022-04-071-1/+5
|
* Improve libyaml source downloading error messagesAlan Wu2022-04-041-4/+10
| | | | | | | | | | People trying to build CRuby by following the instructions in its [README] have been running into [errors] due to missing `libyaml` on their system. Let's try to present a better error message when it happens. [README]: https://github.com/ruby/ruby/tree/fb5aa31e2d20ea8e1425432672f4de4c8ca2c26b#how-to-compile-and-install [errors]: https://github.com/ruby/psych/issues/552
* Propagate `CC` to libyamlNobuyoshi Nakada2022-04-011-0/+1
| | | | | | It is needed for cross-compiling to set properly. Just `--target`/`--host`/`--build` seems insufficient on some platforms.
* Output libyaml configure logNobuyoshi Nakada2022-04-011-7/+10
|
* Make a static library from PIC object filesNobuyoshi Nakada2022-03-312-2/+11
| | | | | On some platforms, PIC and non-PIC code are incompatible and the latter cannot be used for shared objects.
* Remove `unknown` vendor for cross-compiling tool prefixNobuyoshi Nakada2022-03-311-1/+1
|
* Propagate the host configuration to libyamlNobuyoshi Nakada2022-03-301-0/+1
|
* Try bundled libyaml source if pre-installed is unavailableNobuyoshi Nakada2022-03-291-6/+10
|
* Ignore warnings from yaml-0.2.5Nobuyoshi Nakada2022-03-281-0/+1
| | | | These already have been reported to the upstream repeatedly.
* Download libyaml sourceNobuyoshi Nakada2022-03-272-0/+15
|
* Configure libyaml from the original sourceNobuyoshi Nakada2022-03-272-31/+43
|
* Added condition for macOS homebrewHiroshi SHIBATA2022-03-261-1/+1
| | | | Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
* Removed bundled libyamlHiroshi SHIBATA2022-02-2212-13044/+0
|
* Merge pull request #481 from headius/jruby_updatesCharles Oliver Nutter2021-06-042-52/+142
|\ | | | | JRuby updates and fixes
| * Minor optimization: defer runtime accessCharles Oliver Nutter2021-02-251-16/+18
| |
| * Minor optimizationCharles Oliver Nutter2021-02-251-1/+2
| |
| * Clean up type checks and trancodesCharles Oliver Nutter2021-02-251-37/+51
| |
| * Make malformed input noisyCharles Oliver Nutter2021-02-251-1/+46
| | | | | | | | | | | | | | | | parse should reject input encoded incorrectly. The default behavior for InputStreamReader is to replace malformed characters, which causes one exception-expecting test to fail. This patch changes the behavior to report malformed input, which can then be reraised as a syntax error.