Skip to content

Commit

Permalink
Set Ruby to 3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
HarlemSquirrel committed Jun 7, 2022
1 parent 677baf2 commit 5b6a8a0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
BUNDLE_JOBS: "4"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.7.1
ruby-3.1.2
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source 'https://rubygems.org'

ruby '2.7.1'
ruby '3.1.2'

gem 'activesupport', '~> 6.0', '>= 6.0.3.2', require: 'active_support/all'
gem 'minitest', '~> 5.14', '>= 5.14.1'
Expand Down
33 changes: 16 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
GIT
remote: https://github.com/kern/minitest-reporters.git
revision: 9cb9e78aed69bfe4eed6c27b5b795e8bb4ad708f
revision: 466b060a906298148836e368916aee930d28f618
specs:
minitest-reporters (1.4.2)
minitest-reporters (1.5.0)
ansi
builder
minitest (>= 5.0)
Expand All @@ -11,29 +11,28 @@ GIT
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.3.2)
activesupport (6.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ansi (1.5.0)
builder (3.2.4)
coderay (1.1.3)
concurrent-ruby (1.1.6)
i18n (1.8.3)
concurrent-ruby (1.1.10)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
method_source (1.0.0)
minitest (5.14.1)
minitest (5.15.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.1)
ruby-progressbar (1.10.1)
thread_safe (0.3.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
zeitwerk (2.4.0)
rake (13.0.6)
ruby-progressbar (1.11.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
zeitwerk (2.5.4)

PLATFORMS
mswin64
Expand All @@ -48,7 +47,7 @@ DEPENDENCIES
rake (~> 13.0, >= 13.0.1)

RUBY VERSION
ruby 2.7.1p83
ruby 3.1.2p20

BUNDLED WITH
2.1.4
6 changes: 3 additions & 3 deletions lib/compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def log(message = nil)
warn message
end

def stuff(library, &block)
def stuff(library, &)
source = File.join PRJ_ROOT, 'vendor', library
target = File.join @options[:tmpdir], library

Expand All @@ -498,7 +498,7 @@ def stuff(library, &block)
log "=> Stuffing #{library}..."

@utils.capture_run_io "stuff_#{library}" do
@utils.chdir(target, &block)
@utils.chdir(target, &)
end

log "=> Stuffed #{library}"
Expand Down Expand Up @@ -789,7 +789,7 @@ def local_toolchain_env
{
'CI' => 'true',
'GEM_PATH' => File.join(@ruby_install, 'lib', 'ruby', 'gems', self.class.ruby_api_version),
'PATH' => "#{File.join(@ruby_install, 'bin')}:#{ENV['PATH']}",
'PATH' => "#{File.join(@ruby_install, 'bin')}:#{ENV.fetch('PATH', nil)}",
'ENCLOSE_IO_USE_ORIGINAL_RUBY' => 'true',
'ENCLOSE_IO_RUBYC_1ST_PASS' => 'true',
'ENCLOSE_IO_RUBYC_2ND_PASS' => nil
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def run_allow_failures(*args)
status
end

def chdir(path, &block)
def chdir(path, &)
warn "-> cd #{path}" unless @options[:quiet]
Dir.chdir(path, &block)
Dir.chdir(path, &)
warn "-> cd #{Dir.pwd}" unless @options[:quiet]
end

Expand All @@ -90,7 +90,7 @@ def cp(from, to)

def cp_r(from, to, options = {})
warn "-> cp -r #{from.inspect} #{to.inspect}" unless @options[:quiet]
FileUtils.cp_r(from, to, options)
FileUtils.cp_r(from, to, **options)
end

def rm(path)
Expand Down
4 changes: 2 additions & 2 deletions test/roundtrip/test_rubyc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ def ruby(*args)

Thread.new do
until (raw_line = stdout.gets).nil?
parsed_line = Hash[timestamp: Time.now, line: raw_line.to_s]
parsed_line = { timestamp: Time.now, line: raw_line.to_s }
$stdout.puts "rubyc's ruby STDOUT: #{parsed_line}"
end
end

Thread.new do
until (raw_line = stderr.gets).nil?
parsed_line = Hash[timestamp: Time.now, line: raw_line.to_s]
parsed_line = { timestamp: Time.now, line: raw_line.to_s }
warn "rubyc's ruby STDERR: #{parsed_line}"
end
end
Expand Down

0 comments on commit 5b6a8a0

Please sign in to comment.