Skip to content

Commit 248f6ba

Browse files
committed
Revert "[GR-8924] Switch to native json"
PullRequest: truffleruby/759
2 parents 53ab42b + e23a2cd commit 248f6ba

37 files changed

+836
-4126
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Changes:
2020
* The Trufle handle patches applied to `psych` C extension have now been removed.
2121
* The `rb_tr_handle_*` functions have been removed as they are no
2222
longer used in any C extension patches.
23-
* The native version of `json` is now being used.
2423

2524
Bug fixes:
2625

doc/contributor/updating-ruby.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ You'll usually get some conflicts to work out.
4949
* Update `doc/legal/legal.md`
5050
* Update `doc/contributor/stdlib.md`
5151

52+
## Update libraries from third-party repos
53+
54+
Look in `../ruby/ext/json` to see the version of `flori/json` being used, and
55+
then copy the original source of `flori/json` into `lib/json`.
56+
5257
## Updating .gemspec of default gems
5358

5459
Default gems are imported from MRI files, except the .gemspec files in

lib/mri/json.rb renamed to lib/json/lib/json.rb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,10 @@
5555
module JSON
5656
require 'json/version'
5757

58-
if RUBY_ENGINE == 'truffleruby'
59-
# Expose load errors
60-
require 'json/ext'
61-
else
62-
begin
63-
require 'json/ext'
64-
rescue LoadError
65-
require 'json/pure'
66-
end
67-
end
58+
# TruffleRuby: we use the pure version at the moment, to avoid loading C extensions for JSON
59+
#begin
60+
# require 'json/ext'
61+
#rescue LoadError
62+
require 'json/pure'
63+
#end
6864
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)