Skip to content

Commit 3bfe810

Browse files
build: Keep default extensions for older Ruby versions
1 parent c77a370 commit 3bfe810

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/ruby_wasm/cli.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def build_config(options)
162162
config = { target: options[:target_triplet], src: compute_build_source(options) }
163163
case options[:profile]
164164
when "full"
165-
config[:default_exts] = RubyWasm::Packager::ALL_DEFAULT_EXTS
165+
config[:default_exts] = config[:src][:all_default_exts]
166166
env_additional_exts = ENV["RUBY_WASM_ADDITIONAL_EXTS"] || ""
167167
unless env_additional_exts.empty?
168168
config[:default_exts] += "," + env_additional_exts
@@ -211,15 +211,18 @@ def self.build_source_aliases(root)
211211
"head" => {
212212
type: "github",
213213
repo: "ruby/ruby",
214-
rev: "master"
214+
rev: "master",
215+
all_default_exts: RubyWasm::Packager::ALL_DEFAULT_EXTS,
215216
},
216217
"3.3" => {
217218
type: "tarball",
218-
url: "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.tar.gz"
219+
url: "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0.tar.gz",
220+
all_default_exts: "bigdecimal,cgi/escape,continuation,coverage,date,dbm,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,etc,fcntl,fiber,gdbm,json,json/generator,json/parser,nkf,objspace,pathname,psych,racc/cparse,rbconfig/sizeof,ripper,stringio,strscan,monitor,zlib,openssl",
219221
},
220222
"3.2" => {
221223
type: "tarball",
222-
url: "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.3.tar.gz"
224+
url: "https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.3.tar.gz",
225+
all_default_exts: "bigdecimal,cgi/escape,continuation,coverage,date,dbm,digest/bubblebabble,digest,digest/md5,digest/rmd160,digest/sha1,digest/sha2,etc,fcntl,fiber,gdbm,json,json/generator,json/parser,nkf,objspace,pathname,psych,racc/cparse,rbconfig/sizeof,ripper,stringio,strscan,monitor,zlib,openssl",
223226
}
224227
}
225228

0 commit comments

Comments
 (0)