jruby-scala 0.1.0 → 0.1.1
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/.gitignore +1 -0
- data/README.rdoc +12 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/jruby_scala/core_ext/operator_translations.rb +0 -3
- data/spec/jruby_scala/core_ext/operator_translations_spec.rb +7 -0
- metadata +2 -2
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
@@ -9,6 +9,18 @@ Daniel Spiewak:
|
|
9
9
|
|
10
10
|
many thanks to Daniel for his great article and implementation.
|
11
11
|
|
12
|
+
== Usage
|
13
|
+
|
14
|
+
You'll need to make sure JRuby loads the scala-library jar before this gem is loaded. You can do this two ways:
|
15
|
+
|
16
|
+
1. Specifying the Jar via classpath when executing JRuby
|
17
|
+
jruby -J-cp path/to/scala-library-VERSION.jar some-ruby-script-which-uses-jruby-scala.rb
|
18
|
+
|
19
|
+
2. Requiring the Scala jar before the gem in your .rb file
|
20
|
+
require 'path/to/scala-library-VERSION.jar'
|
21
|
+
require 'rubygems'
|
22
|
+
require 'jruby_scala'
|
23
|
+
|
12
24
|
== Note on Patches/Pull Requests
|
13
25
|
|
14
26
|
* Fork the project.
|
data/Rakefile
CHANGED
@@ -11,7 +11,7 @@ begin
|
|
11
11
|
gem.homepage = "http://github.com/wemrysi/jruby-scala"
|
12
12
|
gem.authors = ["Emrys Ingersoll"]
|
13
13
|
gem.add_development_dependency "rspec", ">= 1.2.9"
|
14
|
-
gem.add_development_dependency "yard", ">= 0"
|
14
|
+
gem.add_development_dependency "yard", ">= 0.5.3"
|
15
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
16
|
end
|
17
17
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -50,8 +50,6 @@ module JrubyScala
|
|
50
50
|
elsif sym == :to_proc and type_of_scala_function?(self)
|
51
51
|
self
|
52
52
|
else
|
53
|
-
method_missing_without_scala_operator_translations(sym, *args)
|
54
|
-
=begin
|
55
53
|
str = sym.to_s
|
56
54
|
str = $&[1] + '_=' if str =~ /^(.*[^\]=])=$/
|
57
55
|
OPERATORS.each {|from, to| str.gsub!(from, to)}
|
@@ -61,7 +59,6 @@ module JrubyScala
|
|
61
59
|
else
|
62
60
|
method_missing_without_scala_operator_translations(sym, *args)
|
63
61
|
end
|
64
|
-
=end
|
65
62
|
end
|
66
63
|
end
|
67
64
|
|
@@ -11,6 +11,13 @@ describe "JrubyScala::CoreExt::OperatorTranslations" do
|
|
11
11
|
@h[0]
|
12
12
|
end
|
13
13
|
|
14
|
+
it "should translate operators into a corresponding method call" do
|
15
|
+
@h = @h.update(1, 67)
|
16
|
+
@h[1].should == 67
|
17
|
+
@h = @h - 1
|
18
|
+
lambda {@h[1]}.should raise_error(java.util.NoSuchElementException)
|
19
|
+
end
|
20
|
+
|
14
21
|
describe "when an object extends a Scala FunctionN" do
|
15
22
|
it "should translate #call to #apply" do
|
16
23
|
@h.should_receive(:apply).with(0)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-scala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emrys Ingersoll
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.5.3
|
34
34
|
version:
|
35
35
|
description: A Scala integration library for JRuby that allows using Procs as Scala functions, including Scala traits into Ruby modules, and more.
|
36
36
|
email: ingersoll@gmail.com
|