Skip to content

Commit

Permalink
Merge pull request #1736 from johanneswuerbach/config-ruby-3.1
Browse files Browse the repository at this point in the history
feat(sinatra): support ruby 3.1
  • Loading branch information
jkowens committed Jan 5, 2022
2 parents 147f8eb + d147166 commit d255957
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
# TODO: Add jruby if something like allow_failures will be implemented on Actions.
ruby: [2.6, 2.7, '3.0']
ruby: [2.6, 2.7, '3.0', 3.1]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion sinatra-contrib/lib/sinatra/config_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def config_file(*paths)
raise UnsupportedConfigType unless ['.yml', '.yaml', '.erb'].include?(File.extname(file))
logger.info "loading config file '#{file}'" if logging? && respond_to?(:logger)
document = ERB.new(IO.read(file)).result
yaml = YAML.load(document)
yaml = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(document) : YAML.load(document)
config = config_for_env(yaml)
config.each_pair { |key, value| set(key, value) }
end
Expand Down

0 comments on commit d255957

Please sign in to comment.