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

Drop support for Ruby 1.8. #256

Merged
merged 3 commits into from
Apr 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ bundler_args: --without development

matrix:
include:
- rvm: "1.8.7"
dist: precise
- rvm: "1.9.2"
dist: precise
- rvm: jruby-18mode # JRuby in 1.8 mode
dist: precise
- rvm: jruby-19mode # JRuby in 1.9 mode
dist: precise
4 changes: 4 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.16.0 (unreleased)

- Support for Ruby 1.8 has been discontinued - [#256](https://github.com/egonSchiele/contracts.ruby/pull/256)

## v0.15.0
- Bugfix: Func contract's return value isn't enforced with blocks - [Piotr Szmielew](https://github.com/esse) [#251](https://github.com/egonSchiele/contracts.ruby/pull/251)
- Bugfx: Fix contracts used in AR-models - [Gert Goet](https://github.com/eval) [#237](https://github.com/egonSchiele/contracts.ruby/pull/237)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Using contracts.ruby results in very little slowdown. Check out [this blog post]

**Q.** What Rubies can I use this with?

**A.** It's been tested with `1.8.7`, `1.9.2`, `1.9.3`, `2.0.0`, `2.1`, `2.2`, and `jruby` (both 1.8 and 1.9 modes).
**A.** It's been tested with `1.9.2`, `1.9.3`, `2.0.0`, `2.1`, `2.2`, and `jruby` (1.9 mode).

If you're using the library, please [let me know](https://github.com/egonSchiele) what project you're using it on :)

Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ else
task :default => [:spec]
end


task :add_tag do
`git tag -a v#{Contracts::VERSION} -m 'v#{Contracts::VERSION}'`
end
Expand Down
15 changes: 3 additions & 12 deletions lib/contracts/support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@ class << self
def method_position(method)
return method.method_position if method.is_a?(MethodReference)

if RUBY_VERSION =~ /^1\.8/
if method.respond_to?(:__file__)
method.__file__ + ":" + method.__line__.to_s
else
method.inspect
end
else
file, line = method.source_location
file + ":" + line.to_s
end
file, line = method.source_location
file + ":" + line.to_s
end

def method_name(method)
Expand All @@ -34,8 +26,7 @@ def contract_id(contract)
end

def eigenclass_hierarchy_supported?
return false if RUBY_PLATFORM == "java" && RUBY_VERSION.to_f < 2.0
RUBY_VERSION.to_f > 1.8
RUBY_PLATFORM != "java" || RUBY_VERSION.to_f >= 2.0
end

def eigenclass_of(target)
Expand Down