Repository navigation
Commit bdf2d79
committed
Fix alias_module_function on JRuby
On JRuby 10.1, a singleton method created by module_function(name) turns
private when it is aliased again. Lemon aliases each method under test to
wrap and then restore it, so after the URI.hash_to_query test ran,
Hash#to_uri failed with "private method 'hash_to_query' called for module
URI". This was the only failing test in the JRuby CI job.
alias_module_function now aliases the singleton method directly, which
stays public on JRuby. If the old method isn't a module function, it
falls back to module_function as before.
Adds a test that re-aliases the new singleton method; it fails on JRuby
without this fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2Njj4j1r9twkVcXsMySLW1 parent 1da7a2d commit bdf2d79
3 files changed
Lines changed: 18 additions & 3 deletions
File tree
- lib/core/facets/module
- test/core/module
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
17 | 26 | | |
18 | | - | |
19 | | - | |
| 27 | + | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
| |||
0 commit comments