The unexpected heatwave this past Sunday might have tempted you to buy an ice cream cone (or two). Had you stuffed your sweet treat in your pocket at some point, you would’ve unknowingly committed a crime. We agree: it sounds absurd — but it’s New York City law.

Many of these regulations are referred to as “blue laws,” a term that was coined to describe rules that made church attendance mandatory, and prohibited secular activities on Sundays. According to an enduring myth, the laws were so called because they were believed to be printed on blue paper or bound in books with blue covers. (However, the more probable explanation derives from the 18th-century usage of the word “blue” meaning “rigidly moral.”)

Find out what other laws you may be breaking with our roundup of the strangest New York City and state laws:

11. It is illegal in New York State to transport an ice cream cone in one’s pocket on a Sunday

Ice cream from Ample Hills

The origin behind this law is still murky, but certainly worth mentioning: once upon a time, someone reportedly strolled through Manhattan with an ice cream cone in his pocket, causing “untold mischief.” What kind of mischief is not clearly stated — and trust us, we’ve combed through the web to find the answer — but the act was apparently enough to enact regulation. Interestingly enough, CraveOnline.com claims that it gave birth to the ice cream sundae, which was traditionally sold on Sundays as a way to bypass the law.