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

fixes issue #242 - contract's return value is now enforced with blocks properly #251

Merged
merged 3 commits into from
Feb 24, 2017

Conversation

esse
Copy link
Contributor

@esse esse commented Feb 20, 2017

This commit fixes issue with contracts for function that takes blocks. Return type is now enforced properly for blocks.

@esse
Copy link
Contributor Author

esse commented Feb 20, 2017

@egonSchiele do contracts_spec_2.0.rb spec should pass for all ruby versions? or is it specific to some type?

@egonSchiele
Copy link
Owner

@esse they are specs for all rubies >= v 2.0. The logic to load that file lives here. So it is a legitimate test failure. Definitely one of the toughest parts of this codebase!

@esse
Copy link
Contributor Author

esse commented Feb 21, 2017

@egonSchiele I run rake (as README encouraged) instead of rspec (as run by travis). And rake shows me that all tests are passing, but rspec show failures.

I believe it would be nice to change it in a README - I will propose pull request with that.

@esse
Copy link
Contributor Author

esse commented Feb 23, 2017

@egonSchiele I commited fixes to that issue. Hoewever travis has some problems with resolving gems for Ruby 1.8 and 1.9.

@egonSchiele egonSchiele merged commit 13e56bd into egonSchiele:master Feb 24, 2017
@egonSchiele
Copy link
Owner

Nice work, thank you!

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Jun 4, 2017
## v0.16.0

- **Support for Ruby 1.8 has been discontinued** - [Corey Farwell](https://github.com/frewsxcv) [#256](egonSchiele/contracts.ruby#256)
- Enhancement: Add a `Contracts::Attrs` module containing attribute w/ contracts utilities - [Corey Farwell](https://github.com/frewsxcv) [#255](egonSchiele/contracts.ruby#255)
- Bugfix: Fix StrictHash contract for extra keys - [Maciej Malecki](https://github.com/smt116) [#254](egonSchiele/contracts.ruby#254)

## v0.15.0
- Bugfix: Func contract's return value isn't enforced with blocks - [Piotr Szmielew](https://github.com/esse) [#251](egonSchiele/contracts.ruby#251)
- Bugfx: Fix contracts used in AR-models - [Gert Goet](https://github.com/eval) [#237](egonSchiele/contracts.ruby#237)
amatsuda added a commit to amatsuda/middleman that referenced this pull request Jan 8, 2024
contracts tries to run given Procs since egonSchiele/contracts.ruby#251
and this sometimes causes RuntimeError
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