Skip to content

Conversation

@katsyoshi
Copy link
Owner

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 75 to +78
def parse_line(line)
line.split(/\s+/).reject { |o| o.empty? }.map { |op| op.gsub(/,/, "") }
return { label: line.delete_suffix(":"), size: 0 } if line.end_with?(":")
op, *operands = line.split(/\s+/).reject(&:empty?).map { it.gsub(/,/, "") }
size = instruction_size(op, *operands)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace undefined it in parse_line operand mapping

parse_line now maps operands with map { it.gsub(/,/, "") }, but Ruby does not provide an implicit it, so assembling any non-label line raises a NameError before opcode sizing occurs. This breaks all assembly paths (e.g., loading sample programs or running the new tests) because operand parsing fails. Use an explicit block argument or _1 instead.

Useful? React with 👍 / 👎.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. must use it for single-parameter blocks.

ruby 3.4 supports it for block single variable.

@katsyoshi katsyoshi merged commit 01c1909 into main Dec 23, 2025
1 check passed
@katsyoshi katsyoshi deleted the support-new-instractions branch December 23, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants