My Recent Pastes (150 and counting)
Pastes by enebo (150 and counting)
Below are the 15 most recent pasties by enebo.
December 30, 2009
11:39AM EDT
by enebo
View all 13 lines
require 'java' task = java.util.concurrent.FutureTask.new { "HEH" } es = java.util.concurrent.Executors.newSingleThreadExecutor es.submit task
December 11, 2009
12:35PM EDT
by enebo
require 'java' fp = java.lang.Class.forName("java.lang.ClassLoader").get_declared_field("sys_paths"); fp.accessible = true fp.set(nil, nil)
December 11, 2009
11:58AM EDT
by enebo
View all 8 lines
require 'java' java_import java.lang.ClassLoader class ClassLoader field_accessor :sys_paths
December 09, 2009
2:58PM EDT
by enebo
View all 13 lines
jr -S ast --source --sexp -e 'puts "A"' Source: puts "A" AST:
November 12, 2009
1:49PM EDT
by enebo
View all 13 lines
public class Test { public static void main(String[] args) { long n = 9147483648L; int x = (int) n; System.out.println(x);
September 26, 2009
1:16PM EDT
by enebo
View all 8 lines
jr -v jruby 1.4.0dev (ruby 1.8.7 patchlevel 174) (2009-09-26 1add48e) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java] enebo:12:15 ~/work/jruby_trunk 895% jr --1.9 -v jruby 1.4.0dev (ruby 1.9.2dev trunk 24186) (2009-09-26 1add48e) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java] enebo:12:15 ~/work/jruby_trunk 896% /usr/local/bin/ruby -v
June 17, 2009
12:47PM EDT
by enebo
View all 8 lines
enebo:17:56 ~/work/jruby_trunk 3134% ruby ~/jruby/scripts/str.rb /Users/enebo/jruby/scripts/str.rb:3: syntax error, unexpected $undefined, expecting $end puts '\\\'' ^ enebo:17:56 ~/work/jruby_trunk 3135% jr ~/jruby/scripts/str.rb
May 22, 2009
6:20PM EDT
by enebo
View all 16 lines
BASIC_TYPES = [:boolean, :byte, :short, :char, :int, :long, :float, :double] def java_return(mb, retval) type_name = retval.simple_name.to_sym
April 24, 2009
12:40PM EDT
by enebo
View all 26 lines
class AbstractGame include RandomHelper field_accessor :display, :finished, :settings end
April 18, 2009
12:16PM EDT
by enebo
if java_import(com.google.appengine.api.images.Image) rescue false end require 'image_voodoo/gae' else require 'image_voodoo/awt' end
January 08, 2009
4:19PM EDT
by enebo
View all 17 lines
@Override public IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) { IRubyObject value = caseNode == null ? null : caseNode.interpret(runtime, context, self, aBlock); context.pollThreadEvents();
November 28, 2008
5:54PM EDT
by enebo
View all 75 lines
Index: src/org/jruby/RubyThread.java =================================================================== --- src/org/jruby/RubyThread.java (revision 8191) +++ src/org/jruby/RubyThread.java (working copy) @@ -87,6 +87,7 @@
November 28, 2008
5:00PM EDT
by enebo
View all 16 lines
require 'java' class Base include java.util.Comparator end
November 26, 2008
4:56PM EDT
by enebo
View all 10 lines
require 'java' class Java::lang.Iterable def each(&block) iter = iterator
