pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/jruby/jruby/commit/fede2acc0d09e1ddb491f6638b16d6b5218ce615

mer-b48faa60c69660fa.css" /> We no longer support < Java 8 · jruby/jruby@fede2ac · GitHub
Skip to content

Commit fede2ac

Browse files
committed
We no longer support < Java 8
1 parent 6db7e79 commit fede2ac

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

spec/java_integration/types/map_spec.rb

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@
129129

130130
test_ok(h.clear.empty?)
131131

132-
# Java 8 adds a replace method to Map that takes a key and value
133132
h.ruby_replace({1=>100})
134133

135134
test_equal({1=>100}, h)
@@ -159,12 +158,7 @@
159158
h1.put("a", 100); h1.put("b", 200)
160159
h2 = java.util.LinkedHashMap.new
161160
h2.put("b", 254); h2.put("c", 300)
162-
# Java 8 adds a merge method to Map used for merging multiple values for a given key in-place
163-
if ENV_JAVA['java.specification.version'] < '1.8'
164-
test_equal({"a"=>100, "b"=>254, "c"=>300}, h1.merge(h2))
165-
else
166-
test_equal({"a"=>100, "b"=>254, "c"=>300}, h1.ruby_merge(h2))
167-
end
161+
test_equal({"a"=>100, "b"=>254, "c"=>300}, h1.ruby_merge(h2))
168162
test_equal({"a"=>100, "b"=>454, "c"=>300}, h1.ruby_merge(h2) { |k, o, n| o+n })
169163
expect( h1.inspect ).to include "{\"a\"=>100, \"b\"=>200}"
170164

@@ -179,19 +173,13 @@
179173
test_equal({1=>100, 2=>200}, h.reject! { |k, v| k > 2 })
180174
expect( h.inspect ).to include "{1=>100, 2=>200}"
181175

182-
# Java 8 adds a replace method to Map that takes a key and value
183176
test_equal({"c"=>300, "d"=>400, "e"=>500}, h.ruby_replace({"c"=>300, "d"=>400, "e"=>500}))
184177
test_equal(Java::JavaUtil::LinkedHashMap, h.class)
185178

186179
test_equal({"d"=>400, "e"=>500}, h.select {|k,v| k > "c"})
187180
test_equal({"c"=>300}, h.select {|k,v| v < 400})
188181

189-
# Java 8 adds a replace method to Map that takes a key and value
190-
if ENV_JAVA['java.specification.version'] < '1.8'
191-
h.replace({"a"=>20, "d"=>10, "c"=>30, "b"=>0})
192-
else
193-
h.ruby_replace({"a"=>20, "d"=>10, "c"=>30, "b"=>0})
194-
end
182+
h.ruby_replace({"a"=>20, "d"=>10, "c"=>30, "b"=>0})
195183
test_equal([["a", 20], ["b", 0], ["c", 30], ["d", 10]], h.sort)
196184
test_equal([["b", 0], ["d", 10], ["a", 20], ["c", 30]], h.sort { |a, b| a[1]<=>b[1] })
197185

@@ -210,7 +198,6 @@
210198
test_equal([true, false, false, false, false], h.collect { |k, v| k == "a" })
211199
test_equal([["a", 20], ["d", 10]], h.take(2))
212200

213-
# Java 8 adds a replace method to Map that takes a key and value
214201
h.ruby_replace({"a"=>100, "b"=>200})
215202

216203
h2 = {"b"=>254, "c"=>300}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy