mruby-print: disable the gem unless explicitly specified

mruby-print is the duplicate of part of mruby-io. You need it only when
limited I/O functionality required.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-01-05 08:05:01 +09:00
parent ef88c3b726
commit 003e0fb330
5 changed files with 9 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
MRuby::GemBox.new do |conf|
Dir.glob("#{root}/mrbgems/mruby-*/mrbgem.rake") do |x|
g = File.basename(File.dirname(x))
conf.gem :core => g unless g =~ /^mruby-(?:bin-debugger|test)$/
conf.gem :core => g unless g =~ /^mruby-(?:bin-debugger|test|print)$/
end
end
-1
View File
@@ -4,7 +4,6 @@ MRuby::Gem::Specification.new('mruby-bin-mruby') do |spec|
spec.summary = 'mruby command'
spec.bins = %w(mruby)
spec.add_dependency('mruby-compiler', :core => 'mruby-compiler')
spec.add_test_dependency('mruby-print', :core => 'mruby-print')
if build.cxx_exception_enabled?
build.compile_as_cxx("#{spec.dir}/tools/mruby/mruby.c")
+2 -1
View File
@@ -1,5 +1,6 @@
MRuby::Gem::Specification.new('mruby-print') do |spec|
spec.license = 'MIT'
spec.author = 'mruby developers'
spec.summary = 'standard print/puts/p'
spec.summary = 'minimal print/puts'
# mruby-io provides full I/O functionality
end
-3
View File
@@ -7,9 +7,6 @@ MRuby::GemBox.new do |conf|
# Use standard IO/File class
conf.gem :core => "mruby-socket"
# Use standard print/puts/p
conf.gem :core => "mruby-print"
# Use errno extension for a good mruby-io/mruby-socket experience
conf.gem :core => "mruby-errno"
+6 -6
View File
@@ -59,11 +59,11 @@ assert('Kernel.loop', '15.3.1.2.8') do
assert_equal 100, i
end
# Kernel.p is provided by the mruby-print mrbgem. '15.3.1.2.9'
# Kernel.p is provided by the mruby-io mrbgem. '15.3.1.2.9'
# Kernel.print is provided by the mruby-print mrbgem. '15.3.1.2.10'
# Kernel.print is provided by the mruby-io mrbgem. '15.3.1.2.10'
# Kernel.puts is provided by the mruby-print mrbgem. '15.3.1.2.11'
# Kernel.puts is provided by the mruby-io mrbgem. '15.3.1.2.11'
assert('Kernel.raise', '15.3.1.2.12') do
assert_raise RuntimeError do
@@ -377,11 +377,11 @@ assert('Kernel#object_id', '15.3.1.3.33') do
assert_kind_of Numeric, 1.0.object_id
end
# Kernel#p is defined in mruby-print mrbgem. '15.3.1.3.34'
# Kernel#p is defined in mruby-io mrbgem. '15.3.1.3.34'
# Kernel#print is defined in mruby-print mrbgem. '15.3.1.3.35'
# Kernel#print is defined in mruby-io mrbgem. '15.3.1.3.35'
# Kernel#puts is defined in mruby-print mrbgem. '15.3.1.3.39'
# Kernel#puts is defined in mruby-io mrbgem. '15.3.1.3.39'
assert('Kernel#raise', '15.3.1.3.40') do
assert_raise RuntimeError do