jruby-scala-collections-scala2.11 0.1.7-java → 0.1.8-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/jruby/scala_support.rb +0 -12
- metadata +1 -1
data/lib/jruby/scala_support.rb
CHANGED
@@ -181,8 +181,6 @@ module JRuby::ScalaSupport
|
|
181
181
|
JRuby::ScalaSupport::Common.fake_identity self, Hash
|
182
182
|
|
183
183
|
class << self
|
184
|
-
alias_method :previous_new, :new
|
185
|
-
|
186
184
|
def [](*args)
|
187
185
|
hash = new
|
188
186
|
if args.size == 1
|
@@ -211,16 +209,6 @@ module JRuby::ScalaSupport
|
|
211
209
|
|
212
210
|
hash
|
213
211
|
end
|
214
|
-
|
215
|
-
def new(default_value=nil, &default_block)
|
216
|
-
raise ArgumentError, "You can only provide either a default value or a block" if default_value && default_block
|
217
|
-
h = Java::scala.collection.mutable.HashMap.new
|
218
|
-
if default_block
|
219
|
-
h = h.with_default {|k| default_block.call(h,k) }
|
220
|
-
end
|
221
|
-
h = h.with_default_value(default_value) if default_value
|
222
|
-
previous_new(h)
|
223
|
-
end
|
224
212
|
end
|
225
213
|
|
226
214
|
def []=(key, value)
|