From cf40b5b9178cb5e53944dee581d8b1c4a1ade6d4 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Tue, 29 Nov 2022 17:01:07 +0400 Subject: [PATCH] Add gembox "stdlib"; make Ruby module more complex --- build_config.rb | 1 + rootfs/boot/hello.rb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build_config.rb b/build_config.rb index d379c7c..098ba1b 100644 --- a/build_config.rb +++ b/build_config.rb @@ -2,6 +2,7 @@ MRuby::CrossBuild.new ENV.fetch 'BUILD_NAME' do |conf| conf.toolchain :gcc conf.gem core: 'mruby-compiler' + conf.gembox 'stdlib' conf.cc.flags << '-Wall' << diff --git a/rootfs/boot/hello.rb b/rootfs/boot/hello.rb index e7a14ea..06ecfc5 100644 --- a/rootfs/boot/hello.rb +++ b/rootfs/boot/hello.rb @@ -1,4 +1,4 @@ -hello = 'Hello, World!' -works = 'Ruby modules work!' -s = [hello, works].join ' ' +hello = 'Hello, World' +works = 'Ruby modules work' +s = [hello, works].map { |s| "#{s}!" }.join ' ' console_puts s