Skip to content

Avoid crash for integer values in content_type parameters#2078

Merged
dentarg merged 1 commit intosinatra:mainfrom
fbrusatti:format-integer-argument-in-content-type
Jan 29, 2025
Merged

Avoid crash for integer values in content_type parameters#2078
dentarg merged 1 commit intosinatra:mainfrom
fbrusatti:format-integer-argument-in-content-type

Conversation

@fbrusatti
Copy link
Copy Markdown
Contributor

@fbrusatti fbrusatti commented Jan 25, 2025

Here we only ensure that =~ is applicable by calling to_s before using it.

Close #2077

@dentarg dentarg added the bug label Jan 29, 2025
@dentarg dentarg changed the title Formats integer values correctly in Content-Type parameters Avoid crash for integer values in content_type parameters Jan 29, 2025
@dentarg dentarg merged commit c4b7c04 into sinatra:main Jan 29, 2025
@dentarg
Copy link
Copy Markdown
Member

dentarg commented Jan 29, 2025

Thanks!

zzak pushed a commit to zzak/sinatra that referenced this pull request May 23, 2025
…2078)

Here we ensure that `=~` is applicable by calling `to_s` before
using it.

Close sinatra#2077
zzak pushed a commit that referenced this pull request May 23, 2025
Here we ensure that `=~` is applicable by calling `to_s` before
using it.

Close #2077
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NoMethodError when using content_type params with Integer value

2 participants