Skip to content

Validate the canvas and let the catalogs return enumerators - #21

Merged
rhannequin merged 1 commit into
mainfrom
validate-canvas
Oct 28, 2026
Merged

rhannequin merged 1 commit into
mainfrom
validate-canvas

Conversation

@rhannequin

Copy link
Copy Markdown
Owner

Two fixes found while auditing the project.

  • Canvas raised nothing when the padding left no room for the sky, so a padding of half the size or more drew a sky with a negative radius. It now raises an ArgumentError for a negative padding or one of at least half the size.
  • Calling each without a block on Catalog::Stars, Catalog::ConstellationLines or Catalog::ConstellationBoundaries raised a LocalJumpError. They now return an enumerator, as Enumerable expects.

Canvas raises an ArgumentError when the padding is negative or leaves no
room for the sky, instead of drawing a sky with a negative radius.

The catalogs raised a LocalJumpError when each was called without a block.
They now return an enumerator, as Enumerable expects.
@rhannequin
rhannequin merged commit 85e22b4 into main Oct 28, 2026
4 checks passed
@rhannequin
rhannequin deleted the validate-canvas branch October 28, 2026 19:36
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.

1 participant