Repository navigation
fix(dncl): keep the order of functions after running the Japanese program (#2620) - #2630
Merged
smalruby3-editor-bot[bot] merged 3 commits intoNov 29, 2026
Merged
Conversation
…gram Running in the Japanese tab turned the Ruby of the blocks into blocks again. That Ruby puts the function definitions first, so after a run the functions moved to the top of the program. Run the Ruby in the written order of the scripts instead (rubyInScriptOrder). Closes #2620 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
🤖 autopilot status
Linked issue #2620. Maintained by autopilot (single writer); do not edit. |
|
🚀 Preview deployed (stg API): https://preview.smalruby.app/topic-autopilot-2620-8b9e864e/ |
…opic/autopilot-2620
The issue was not seen with short programs without a list, so the run test also uses the program with a list. Make the ordered Ruby only after the check of the Japanese lines with an error. Refs #2620 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
🤖 敵対的レビュー(round 1): 指摘 3 件(Must 0 / Question 1 / FYI 2) Question
FYI
直してほしい指摘は、モニターの「AI に直してもらう」で指示を書くか、Request changes で ID を指定してから |
smalruby3-editor-bot
Bot
merged commit Nov 29, 2026
1f1f00e
into
topic/japanese-mode-1731
11 checks passed
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
日本語タブで一度実行してからコードタブ → 日本語タブへ戻ると、関数の定義がプログラムの先頭へ移っていた(B30)。
原因: 実行(
handleExecuteLine)は Redux の Ruby(コードタブを通ったあとはブロックから作った Ruby。関数の定義を先に出す)をそのままブロックにしていた。そのため実行のあと、ブロックのスクリプトの並びが「関数が先」になっていた。Changes Made
ruby-tab.jsx: 日本語タブで実行するときは、ブロックにする Ruby をrubyInScriptOrderで書いた順に作り直す(ルビータブの実行は変えない)。dncl-code-tab-script-order.test.jsに「コードタブを通ったあと実行しても関数の並びが変わらない」を足した。docs/dncl/README.mdの「ブロックを通ったときの並び」に実行のときのことを足した。Test Coverage
rubyInScriptOrderが効くこと)を確かめた。Closes #2620
🤖 Generated with Claude Code