Skip to content

Commit

Permalink
Fix Zeitwerk eager loading
Browse files Browse the repository at this point in the history
  • Loading branch information
skryukov committed Oct 22, 2023
1 parent 52ba8d8 commit c060934
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning].
### Fixed

- Fix compatibility issues for Ruby < 3.1 and JRuby. ([@skryukov])
- Fix Zeitwerk eager loading. ([@skryukov])

## [0.1.0] - 2023-09-27

Expand Down
2 changes: 1 addition & 1 deletion lib/json_skooma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require_relative "json_skooma/inflector"

loader = Zeitwerk::Loader.for_gem
loader.inflector = JSONSkooma::Inflector.new
loader.inflector = JSONSkooma::Inflector.new(__FILE__)
loader.setup

module JSONSkooma
Expand Down
2 changes: 1 addition & 1 deletion lib/json_skooma/inflector.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module JSONSkooma
class Inflector < Zeitwerk::Inflector
class Inflector < Zeitwerk::GemInflector
def camelize(basename, _abspath)
if basename.include?("json_")
super.gsub("Json", "JSON")
Expand Down

0 comments on commit c060934

Please sign in to comment.