Skip to content

fix(dncl): read full-width digits typed into the integer input #2612

Done

Description

@smalruby3-editor-bot

autopilot-base: topic/japanese-mode-1731

不具合(B29)

n = 【整数を入力】 に、全角の数字(IME のまま打った 41)を入れると 0 として扱われる。

入力 表示する(n + 1)
41 42
41.9 42
-3 -2
41(全角) 1(期待は 42)
abc 1

Ruby では console.gets.to_i で、全角の数字は数として読まれない。日本語モードの方針は「見た目だけの揺れ(全角・半角)は読むときに全部受け付ける」(docs/dncl/policy.md)。生徒は IME をつけたまま数を打つことが多い。

AI のおすすめ

【整数を入力】 の答え(と、数として読むところ)で、全角の数字・符号・小数点を半角に直してから数にする。【外部からの入力】(文字列)は変えない。

確かめ方

プレビューの日本語タブで n = 【整数を入力】 / 表示する(n + 1) を実行し、41 を入れる。最終レビュー R12 を AI が確かめたときに見つけた。

Activity

  1. moved this to Sprint Backlog in Autopiloton Nov 28, 2026
  2. added
    🤖 autopilot
    on Nov 28, 2026
  3. moved this from Sprint Backlog to In Progress in Autopiloton Nov 28, 2026
  4. smalruby3-editor-bot commented on Nov 28, 2026

    @smalruby3-editor-bot
    Author

    🤖 対応 PR: #2615 (base: topic/japanese-mode-1731)

    この PR は非デフォルト base 宛てのため GitHub の Development 欄に表示されません。このコメントは autopilot が管理します(編集しないでください)。

  5. moved this from In Progress to Review in Autopiloton Nov 28, 2026
  6. moved this from Review to In Progress in Autopiloton Nov 28, 2026
  7. moved this from In Progress to Review in Autopiloton Nov 28, 2026
  8. added a commit that references this issue on Nov 28, 2026
  9. moved this from Review to Close in Autopiloton Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🤖 autopilot

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions