Skip to content

Commit 3391538

Browse files
justin808claude
andcommitted
Fix Ruby 3.4 compatibility issue with method resolution in Configuration
Resolves NameError when calling ensure_webpack_generated_files_exists in Ruby 3.4.7. The issue occurred because Ruby 3.4 is stricter about distinguishing between local variables and method calls. When parameter names in the initialize method (rsc_bundle_js_file, react_client_manifest_file, react_server_client_manifest_file) shadowed the attr_accessor methods, Ruby 3.4's parser interpreted bare method calls as undefined local variables. Solution: Use public_send(:method_name) to explicitly call the accessor methods, removing ambiguity for the Ruby 3.4 parser. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 017eb79 commit 3391538

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/react_on_rails/configuration.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ def ensure_webpack_generated_files_exists
325325
all_required_files = [
326326
"manifest.json",
327327
server_bundle_js_file,
328-
rsc_bundle_js_file,
329-
react_client_manifest_file,
330-
react_server_client_manifest_file
328+
public_send(:rsc_bundle_js_file),
329+
public_send(:react_client_manifest_file),
330+
public_send(:react_server_client_manifest_file)
331331
].compact_blank
332332

333333
if webpack_generated_files.empty?

0 commit comments

Comments
 (0)