Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue compiling mime-types in MacRuby #28

Closed
jasonlor opened this issue Apr 4, 2013 · 3 comments
Closed

Issue compiling mime-types in MacRuby #28

jasonlor opened this issue Apr 4, 2013 · 3 comments
Assignees
Milestone

Comments

@jasonlor
Copy link

jasonlor commented Apr 4, 2013

/Library/Ruby/Gems/MacRuby/0.12/gems/mime-types-1.22/lib/mime/types.rb:710:in block': regexp
\A
\s*
([])? # 0: Unregistered?
(!)? # 1: Obsolete?
(?:(\w+):)? # 2: Platform marker
(?-mix:([-\w.+]+)/([-\w.+]
))? # 3,4: Media type
(?:\s+@([^\s]+))? # 5: Extensions
(?:\s+:((?-mix:(?:base64|7bit|8bit|quoted-printable))))? # 6: Encoding
(?:\s+'(.+))? # 7: URL list
(?:\s+=(.+))? # 8: Documentation
(?:\s_([#]._)?)?
\s*
\z
' compilation error: U_REGEX_MISSING_CLOSE_BRACKET (RegexpError)
from /Library/Ruby/Gems/MacRuby/0.12/gems/mime-types-1.22/lib/mime/types.rb:600:in block' from /Library/Ruby/Gems/MacRuby/0.12/gems/mime-types-1.22/lib/mime/types.rb:575:inblock'
from /Library/Ruby/Gems/MacRuby/0.12/gems/mime-types-1.22/lib/mime/types.rb:4:in `

'

@halostatue
Copy link
Member

I would classify this as a MacRuby bug.

  - 2.0.0
  - 1.9.3
  - 1.9.2
  - ruby-head
  - 1.8.7
  - jruby-19mode
  - jruby-head
  - jruby-18mode
  - rbx-19mode
  - rbx-18mode
  - ree

This regex has worked for the better part of ~8 years on most other Rubies, and whenever I commit a change, Travis CI now runs against the above versions.

@joeyjoejoejr
Copy link

This is a bug in MacRuby. It only happens when you use /x regular expressions. It sees the # and assumes it's a comment and clears the rest of the line. This can be fixed by escaping the #.

@ghost ghost assigned halostatue Aug 30, 2013
@halostatue
Copy link
Member

This will be resolved permanently in MIME::Types 2.0 because the custom data format will be replaced with a YAML format, as noted under #37.

halostatue added a commit that referenced this issue Oct 20, 2013
A substantial upgrade to the mime-types library. Major features:

- No longer compatible with Ruby 1.8.
- Several major API changes and deprecations.
- The default mime-types registry is now stored as JSON.
- Improved developer tools.
- Improved repackager tools.
- Resolves #28, #36, #37, #43, and #44.
halostatue added a commit that referenced this issue Oct 20, 2013
A substantial upgrade to the mime-types library. Major features:

- No longer compatible with Ruby 1.8.
- Several major API changes and deprecations.
- The default mime-types registry is now stored as JSON.
- Improved developer tools.
- Improved repackager tools.
- Resolves #28.
- Resolves #36.
- Resolves #37.
- Resolves #43.
- Resolves #44.
halostatue added a commit that referenced this issue Oct 20, 2013
A substantial upgrade to the mime-types library. Major features:

- No longer compatible with Ruby 1.8.
- Several major API changes and deprecations.
- The default mime-types registry is now stored as JSON.
- Improved developer tools.
- Improved repackager tools.
- Fixes #28.
- Fixes #36.
- Fixes #37.
- Fixes #43.
- Fixes #44.
halostatue added a commit that referenced this issue Oct 20, 2013
A substantial upgrade to the mime-types library. Major features:

- No longer compatible with Ruby 1.8.
- Several major API changes and deprecations.
- The default mime-types registry is now stored as JSON.
- Improved developer tools.
- Improved repackager tools.
- Fixes #28.
- Fixes #36.
- Fixes #37.
- Fixes #42.
- Fixes #43.
- Fixes #44.
halostatue added a commit that referenced this issue Oct 20, 2013
A substantial upgrade to the mime-types library. Major features:

- No longer compatible with Ruby 1.8.
- Several major API changes and deprecations.
- The default mime-types registry is now stored as JSON.
- Improved developer tools.
- Improved repackager tools.
- Fixes #28.
- Fixes #36.
- Fixes #37.
- Fixes #42.
- Fixes #43.
- Fixes #44.
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

No branches or pull requests

3 participants