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

use Ostruct#marshal_dump instead of #to_h to support Ruby 1.9.3 #32

Merged
merged 1 commit into from
Oct 7, 2015

Conversation

suan
Copy link
Contributor

@suan suan commented Oct 6, 2015

grape-swagger-rails currently breaks on Ruby < 2.0 cause it relies on OpenStruct#to_h, which is new. OpenStruct#marshal_dump is equivalent and is backwards compatible

Also consider adding v1.9.3 to the Travis matrix?

@suan suan force-pushed the ruby_19_swagger_options_fix branch from d5ffbc5 to dc50c28 Compare October 6, 2015 15:22
@@ -5,6 +5,7 @@
* Grape-swagger 0.7.2 is no longer supported - [@dblock](https://github.com/dblock).
* Implemented RuboCop, Ruby-style linter - [@dblock](https://github.com/dblock).
* [#31](https://github.com/ruby-grape/grape-swagger-rails/pull/31): Support Swagger-UI docExpansion option - [@maruware](https://github.com/maruware).
* [#32](https://github.com/ruby-grape/grape-swagger-rails/pull/32): Fix a small bug which broke Ruby 1.9.3 compatibility - [@suan](https://github.com/suan).
Copy link
Member

Choose a reason for hiding this comment

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

This should say Fix Ruby 1.9.3 compatibility.

@dblock
Copy link
Member

dblock commented Oct 6, 2015

If we're going to reintroduce 1.9.3 compatibility, please add it to .travis.yml and make sure a test breaks without this fix.

@suan
Copy link
Contributor Author

suan commented Oct 6, 2015

@dblock Added 1.9.3 to .travis.yml and linked to another PR which shows failures on 1.9.3 without this fix

dblock added a commit that referenced this pull request Oct 7, 2015
use Ostruct#marshal_dump instead of #to_h to support Ruby 1.9.3
@dblock dblock merged commit 6f6e6dc into ruby-grape:master Oct 7, 2015
@dblock
Copy link
Member

dblock commented Oct 7, 2015

Merged

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.

2 participants