diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2023-08-30 16:44:21 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-08-30 20:44:27 +0000 |
| commit | 209eda599a06682b0d32aa84870038e854fc49ef (patch) | |
| tree | 224349af80cf023754a0ffbe05b466b706642b58 | |
| parent | cc71e2344b21e6d9931e7bdd4434c08c56a8ea00 (diff) | |
[ruby/yarp] BASERUBY fails because of .then not existing
https://github.com/ruby/yarp/commit/db925f2b88
| -rwxr-xr-x | yarp/templates/template.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yarp/templates/template.rb b/yarp/templates/template.rb index ec731c3e2f..3969645643 100755 --- a/yarp/templates/template.rb +++ b/yarp/templates/template.rb @@ -308,7 +308,9 @@ module YARP def locals @locals ||= - YAML.load_file(File.expand_path("../config.yml", __dir__)).then do |config| + begin + config = YAML.load_file(File.expand_path("../config.yml", __dir__)) + { nodes: config.fetch("nodes").map { |node| NodeType.new(node) }.sort_by(&:name), tokens: config.fetch("tokens").map { |token| Token.new(token) }, |
