Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 11d255a

Browse filesBrowse files
authored
Revert "Upgrade Ruby to 3.1 (canary test) (#66240)" (#66263)
This reverts commit c0cf76b.
1 parent 3633364 commit 11d255a
Copy full SHA for 11d255a

File tree

Expand file treeCollapse file tree

8 files changed

+14
-33
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+14
-33
lines changed

‎.ruby-version

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.0
1+
3.0.5

‎Gemfile.lock

Copy file name to clipboardExpand all lines: Gemfile.lock
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ DEPENDENCIES
11641164
youtube-dl.rb
11651165

11661166
RUBY VERSION
1167-
ruby 3.1.0p0
1167+
ruby 3.0.5p211
11681168

11691169
BUNDLED WITH
1170-
2.5.17
1170+
2.3.22

‎SETUP.md

Copy file name to clipboardExpand all lines: SETUP.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can do Code.org development using macOS, Ubuntu, or Windows (running Ubuntu
2121
- *Important*: When done, check for correct versions of these dependencies:
2222

2323
```sh
24-
ruby --version # --> ruby 3.1.0
24+
ruby --version # --> ruby 3.0.5
2525
node --version # --> v20.18.3
2626
git-lfs --version # >= git-lfs/3.0
2727
uv --version # >= 0.5.8

‎bin/test/i18n/test_i18n_script_utils.rb

Copy file name to clipboardExpand all lines: bin/test/i18n/test_i18n_script_utils.rb
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
let(:to_crowdin_yaml) {described_class.to_crowdin_yaml(to_crowdin_yaml_data)}
6161

6262
let(:to_crowdin_yaml_data) {{en: {'test' => '#example', 'yes' => 'y'}}}
63-
let(:to_crowdin_yaml_output) {"---\n:en:\n test: \"#example\"\n 'yes': \"y\"\n"}
63+
let(:to_crowdin_yaml_output) {"---\n:en:\n test: \"#example\"\n 'yes': 'y'\n"}
6464

6565
it 'returns correctly formatted yaml' do
6666
_(to_crowdin_yaml).must_equal to_crowdin_yaml_output
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
default['cdo-ruby'] = {
2-
version: '3.1.0',
2+
version: '3.0.5',
33
rubygems_version: '3.3.22',
4-
bundler_version: '2.5.17',
4+
bundler_version: '2.3.22',
55
rake_version: '13.0.1'
66
}

‎cookbooks/cdo-ruby/recipes/ruby-build.rb

Copy file name to clipboardExpand all lines: cookbooks/cdo-ruby/recipes/ruby-build.rb
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
# Arbitrarily use the latest version of ruby build at time this code was
88
# written; this probably doesn't matter, but we need to pick something.
9-
RUBY_BUILD_VERSION = '20250424'.freeze
9+
RUBY_BUILD_VERSION = '20221225'.freeze
1010

11-
remote_file "/tmp/ruby-build-#{RUBY_BUILD_VERSION}.tar.gz" do
11+
remote_file '/tmp/ruby-build.tar.gz' do
1212
source "https://github.com/rbenv/ruby-build/archive/refs/tags/v#{RUBY_BUILD_VERSION}.tar.gz"
1313
action :create_if_missing
1414
end
1515

16-
archive_file "/tmp/ruby-build-#{RUBY_BUILD_VERSION}.tar.gz" do
16+
archive_file '/tmp/ruby-build.tar.gz' do
1717
destination '/tmp/ruby-build'
1818
overwrite :auto
1919
end
@@ -25,8 +25,7 @@
2525
end
2626

2727
# Install dependencies require for ruby-build to succeed
28-
# List taken from: https://github.com/rbenv/ruby-build/wiki#ubuntudebianmint
29-
apt_package %w(autoconf patch build-essential rustc libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libgmp-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev uuid-dev)
28+
apt_package %w(zlib1g-dev)
3029

3130
execute 'install ruby with ruby build' do
3231
# Target /usr/local; it might make sense to install ruby itself to /usr as
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative '../../../shared/helper_spec'
22

33
file_exist '/usr/local/bin/ruby'
4-
cmd 'ruby -v', '3.1.0'
4+
cmd 'ruby -v', '3.0.5'
55
cmd 'gem -v', '3.3.22'
6-
cmd 'bundler -v', '2.5.17'
6+
cmd 'bundler -v', '2.3.22'

‎lib/cdo/yaml.rb

Copy file name to clipboardExpand all lines: lib/cdo/yaml.rb
+1-19Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ def parse_yaml_header(content, locals = {})
1515

1616
# Return +nil+ if file not found.
1717
def load_file(path)
18-
# Temporarily accommodate both Psych 3 and Psych 4 syntax while we
19-
# navigate the transition from Ruby 3.0 to Ruby 3.1.
20-
# See: https://stackoverflow.com/a/71192990/1810460
21-
# TODO infra: simplify down to just the Psych 4 case once we're fully
22-
# upgraded to Ruby 3.1.
23-
super(path, aliases: true)
24-
rescue ArgumentError
2518
super
2619
rescue Errno::ENOENT
2720
nil
@@ -35,19 +28,8 @@ def load_file(path)
3528
# dangerous things in the various `config.yml.erb` files loaded by this
3629
# method, we need to do so.
3730
def load_erb_file(path, binding = nil)
38-
# Temporarily accommodate both Psych 3 and Psych 4 syntax while we
39-
# navigate the transition from Ruby 3.0 to Ruby 3.1.
40-
# See: https://stackoverflow.com/a/71192990/1810460
41-
# TODO infra: simplify down to just the Psych 4 case once we're fully
42-
# upgraded to Ruby 3.1.
4331
# rubocop:disable Security/YAMLLoad
44-
begin
45-
# Psych 4 compatibility
46-
YAML.load(erb_file_to_string(path, binding), aliases: true)
47-
rescue ArgumentError
48-
# Psych 3 compatibility
49-
YAML.load(erb_file_to_string(path, binding))
50-
end
32+
YAML.load(erb_file_to_string(path, binding))
5133
# rubocop:enable Security/YAMLLoad
5234
rescue Errno::ENOENT
5335
nil

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.