Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 028697a7cba3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3ab35b183bfe
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 29, 2015

  1. Copy the full SHA
    4ddbaaa View commit details
  2. Copy the full SHA
    3ab35b1 View commit details
Showing with 6 additions and 4 deletions.
  1. +6 −0 core/src/main/ruby/jruby/truffle/core/shims.rb
  2. +0 −2 spec/truffle/tags/core/env/has_value_tags.txt
  3. +0 −2 spec/truffle/tags/core/env/value_tags.txt
6 changes: 6 additions & 0 deletions core/src/main/ruby/jruby/truffle/core/shims.rb
Original file line number Diff line number Diff line change
@@ -119,6 +119,12 @@ def each_value
end
end

def value?(value)
values.any? { |v| v == value }
end

alias_method :has_value?, :value?

end

class Regexp
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/env/has_value_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
fails(Hash#has_value?):ENV.has_value? returns true if ENV has the value
fails(Hash#has_value?):ENV.has_value? returns false if ENV doesn't have the value
fails(windows - Hash#has_value?):ENV.has_value? looks up values case-insensitively
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/env/value_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
fails(Hash#value?)S:ENV.value? returns true if ENV has the value
fails(Hash#value?):ENV.value? returns false if ENV doesn't have the value
fails(windows - Hash#value?):ENV.value? looks up values case-insensitively