Skip to content

Fix MIME::Type.new error#361

Closed
mackross wants to merge 3 commits intoSciRuby:masterfrom
mackross:master
Closed

Fix MIME::Type.new error#361
mackross wants to merge 3 commits intoSciRuby:masterfrom
mackross:master

Conversation

@mackross
Copy link
Copy Markdown

No description provided.

@kojix2
Copy link
Copy Markdown
Member

kojix2 commented Jan 24, 2025

I'm sorry, but if you don't mind, could you explain a little more about your situation and purpose when you made this pull request?

@sealocal
Copy link
Copy Markdown
Contributor

Agree - there is no description, explanation, or use case provided, so this should be closed. It can be re-opened if explanation is provided.

@mackross
Copy link
Copy Markdown
Author

The way mine types work in newer standard library appears to have changed. I got exceptions when trying to display HTML without using this as the current usage is deprecated.

@sealocal
Copy link
Copy Markdown
Contributor

As-is, this PR fails all of the CI workflows.

What changed about the mime-types? Can you provide any references to that?

Can you provide repro steps to see the error message?

@mackross
Copy link
Copy Markdown
Author

mackross commented Feb 10, 2025 via email

Comment thread lib/iruby/display.rb
true
else
MIME::Type.new("content-type" => mime).ascii?
MIME::Types[mime].first.ascii?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think both the new and old line would be sufficient here, but why change if it works?

Comment thread lib/iruby/display.rb
"application/javascript",
"image/svg+xml"
"image/svg+xml",
"text.html",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MIME Types must have a / in the string. Was the intention to add text/html here?

@sealocal
Copy link
Copy Markdown
Contributor

Closing as there is no clear motivation or direction here. Anyone, please re-open if you want to pick it up.

@sealocal sealocal closed this Feb 12, 2025
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.

3 participants