Commit e9e5f35
Fix ReactOnRailsPro::Utils constant detection
The previous fix in PR #2108 added an overly cautious check that prevented
Pro gem detection even when properly loaded:
return false unless defined?(ReactOnRailsPro::Utils)
This caused tests to fail with:
"NoMethodError: undefined method \`with_trace' for ReactOnRailsPro::Utils:Module"
The issue: After `require "react_on_rails_pro"`, the Utils module IS loaded
(confirmed by checking react_on_rails_pro.rb which requires utils.rb), but
the check was still failing and returning false prematurely.
Solution: Remove the overly cautious Utils check. The existing error handling
(rescue NameError, LoadError) is sufficient to catch any constant loading
issues. The `require "react_on_rails_pro"` ensures Utils is loaded since
react_on_rails_pro.rb explicitly requires it (line 10).
This fixes the test failures while maintaining protection against
uninitialized constant errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 4191060 commit e9e5f35
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | | - | |
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
| |||
0 commit comments