Skip to content

Commit

Permalink
Don't use deprecate_constant in ruby versions that haven't added it
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanahsmith committed Sep 1, 2017
1 parent 224a791 commit 72280d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ language: ruby
rvm:
- 2.1
- 2.2
- 2.3
before_install: gem install bundler -v 1.13.3
4 changes: 3 additions & 1 deletion lib/graphql/batch/promise.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module GraphQL::Batch
Promise = ::Promise
deprecate_constant :Promise
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.3")
deprecate_constant :Promise
end
end

0 comments on commit 72280d9

Please sign in to comment.