This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.Class:-2:in `getDeclaredConstructors0': java.lang.NoClassDefFoundError: com/sun/messaging/jms/ra/ManagedConnection | |
from java.lang.Class:2389:in `privateGetDeclaredConstructors' | |
from java.lang.Class:1459:in `getConstructors' | |
from org.jruby.javasupport.JavaClass:1684:in `getConstructors' | |
from org.jruby.javasupport.JavaClass:657:in `setupClassConstructors' | |
from org.jruby.javasupport.JavaClass:501:in `initializeClass' | |
from org.jruby.javasupport.JavaClass:452:in `<init>' | |
from org.jruby.javasupport.JavaClass:877:in `createJavaClass' | |
from org.jruby.javasupport.JavaClass:860:in `get' | |
from org.jruby.javasupport.JavaClass:489:in `initializeClass' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object MyEnum extends Enumeration { | |
val One = Value("one") | |
val Two = Value("two") | |
} | |
class Blah { | |
import MyEnum._ | |
def doStuff():Option[MyEnum.Value] = { | |
shouldReturnAnOption.getOrElse(None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.{ Enumeration => JavaEnumeration } | |
class EnumerationIterator[T](private[this] val jenum:JavaEnumeration[T]) extends Iterator[T] { | |
def hasNext = jenum.hasMoreElements() | |
def next:T = jenum.nextElement() | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env jruby | |
FOO = [0,1,2,3,4,5,6].map { |n| "foobar_#{n}" } | |
FOO += [7,8,9,10].map { |n| "baz_#{n}" } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RubyYAML.java:252:in `load': java.lang.ClassCastException: org.jvyamlb.exceptions.ConstructorException cannot be cast to org.jvyamlb.Positionable | |
from org/jruby/RubyYAML$s_method_1_0$RUBYINVOKER$load.gen:-1:in `call' | |
from RubyClass.java:530:in `finvoke' | |
from RuntimeHelpers.java:410:in `invoke' | |
from RubyBasicObject.java:315:in `callMethod' | |
from RubyYAML.java:265:in `load_file' | |
from org/jruby/RubyYAML$s_method_1_0$RUBYINVOKER$load_file.gen:-1:in `call' | |
from CachingCallSite.java:278:in `cacheAndCall' | |
from CachingCallSite.java:117:in `call' | |
from CallOneArgNode.java:57:in `interpret' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
# gem 'ffi', '= 0.3.5' | |
require 'ffi' | |
require 'fileutils' | |
if defined?(JRUBY_VERSION) | |
jsys = java.lang.System | |
$stderr.puts "#{jsys.get_property('java.vm.name')} #{jsys.get_property('java.version')}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slyphon@lumpygravy:~/dev/curl-ffi (master) | |
[20091003-01.37.34]$ ruby -Ilib -rcurl_ffi -e 'easy = CurlFFI::Easy.new' | |
/opt/case_sense/git/dev/curl-ffi/lib/curl_ffi/core.rb:109:in `raise_curl_errno!': A libcurl function was given a bad argument (CurlFFI::CurlFFIError) | |
from /opt/case_sense/git/dev/curl-ffi/lib/curl_ffi/core.rb:104:in `assert_zero' | |
from /opt/case_sense/git/dev/curl-ffi/lib/curl_ffi/core.rb:82:in `setwritefunc' | |
from /opt/case_sense/git/dev/curl-ffi/lib/curl_ffi/easy.rb:53:in `on_body' | |
from /opt/case_sense/git/dev/curl-ffi/lib/curl_ffi/easy.rb:35:in `initialize' | |
from -e:1:in `new' | |
from -e:1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
gem 'ffi', '= 0.3.5' | |
require 'ffi' | |
require 'fileutils' | |
# if defined?(JRUBY_VERSION) | |
# jsys = java.lang.System | |
# $stderr.puts "#{jsys.get_property('java.vm.name')} #{jsys.get_property('java.version')}" | |
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env jruby | |
require 'benchmark' | |
require 'base64' | |
ALNUMS = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a | |
ITER = 100_000 | |
blob = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
class SayMahName | |
def initialize | |
@wordlist = File.readlines("/usr/share/dict/web2").map {|n| n.chomp } | |
end | |
def say_some_random_stuff | |
an_array = [] |
OlderNewer