Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Example of a JRuby extension written in Java

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 spec
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 pom.xml
Octocat-spinner-32 test.rb
README.md

Example of a JRuby extension in Java.

Build

$ mvn package

Execution

$ jruby test.rb

This script prints out the 10 first terms of the Fibonacci sequence. To use the JRuby extension:

require 'fibonacci'

seq = Com::Weblogism::Myjrubyext::Fibonacci.new
puts seq.fib(8)
Something went wrong with that request. Please try again.