My Recent Pastes (891 and counting)

Pastes by headius (891 and counting)

Pages:

Below are the 15 most recent pasties by headius.

November 04, 2008
4:25PM EDT
by headius

    public static RubyArray arrayValue(IRubyObject value) {
        IRubyObject tmp = value.checkArrayType();

        if (tmp.isNil()) {
            // Object#to_a is obsolete.  We match Ruby's hack until to_a goes away.  Then we can 

November 04, 2008
4:23PM EDT
by headius

  // access flags 1
  public method__0$RUBY$foo(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
  @Lorg/jruby/anno/JRubyMethod;(name="foo", frame=true, required=0, optional=0, rest=-1)
   FRAME FULL [] []
    ALOAD 1

November 04, 2008
1:57PM EDT
by headius

[headius @ cnutter:~/projects/duby]
◆ time bin/duby -e "a = 1; while a < 100_000_000; a += 1; end"

real        0m2.328s
user        0m1.921s

November 03, 2008
7:20PM EDT
by headius

diff --git a/lib/ruby/1.8/rexml/element.rb b/lib/ruby/1.8/rexml/element.rb
index f757cff..da3fb57 100644
--- a/lib/ruby/1.8/rexml/element.rb
+++ b/lib/ruby/1.8/rexml/element.rb
@@ -553,6 +553,7 @@ module REXML

November 02, 2008
6:49PM EDT
by headius

## jruby
                                              user     system      total        real
1M method_missing                         0.391000   0.000000   0.391000 (  0.390952)
1M sends                                  0.173000   0.000000   0.173000 (  0.172145)
1M method_missing with send               0.437000   0.000000   0.437000 (  0.437215)

November 02, 2008
6:38PM EDT
by headius

[headius @ cnutter:~/projects/jruby]
◆ ruby bench/language/bench_method_dispatch_only.rb 5
Test ruby method: 100k loops calling self's foo 100 times
  1.440000   0.000000   1.440000 (  1.451391)
  1.440000   0.010000   1.450000 (  1.458034)

November 02, 2008
6:36PM EDT
by headius

◆ ruby1.9 bench/bench_fib_recursive.rb 
  0.330000   0.000000   0.330000 (  0.326693)
  0.310000   0.000000   0.310000 (  0.322753)
  0.320000   0.000000   0.320000 (  0.321608)
  0.320000   0.000000   0.320000 (  0.320500)

November 02, 2008
6:01PM EDT
by headius

## mri
                                              user     system      total        real
1M method_missing                         0.580000   0.000000   0.580000 (  0.589016)
1M sends                                  0.350000   0.000000   0.350000 (  0.352271)
1M method_missing with send               0.830000   0.000000   0.830000 (  0.836383)

November 02, 2008
4:44PM EDT
by headius

◆ hg diff -r36 -r37
diff --git a/.hgtags b/.hgtags
new file mode 100644
--- /dev/null
+++ b/.hgtags

November 02, 2008
2:34PM EDT
by headius

diff --git a/src/org/jruby/javasupport/Java.java b/src/org/jruby/javasupport/Java.java
index 0c14b73..2ff1405 100644
--- a/src/org/jruby/javasupport/Java.java
+++ b/src/org/jruby/javasupport/Java.java
@@ -1541,34 +1541,66 @@ public class Java implements Library {

October 31, 2008
1:51PM EDT
by headius

.........................FFjava.lang.NumberFormatException: For input string: "#<Mo"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:447)
        at java.math.BigInteger.<init>(BigInteger.java:314)
        at java.math.BigInteger.<init>(BigInteger.java:447)

October 31, 2008
1:26PM EDT
by headius

require 'set'

module ActiveRecord
  module Associations
    class AssociationCollection < AssociationProxy #:nodoc:

October 31, 2008
12:39PM EDT
by headius

## jruby
                                    user     system      total        real
control, empty loop             0.177000   0.000000   0.177000 (  0.176781)
control, loop with 100 fixnums  0.399000   0.000000   0.399000 (  0.398781)
1m loops, 10 empty arrays       2.338000   0.000000   2.338000 (  2.338180)

October 30, 2008
5:41PM EDT
by headius

diff --git a/src/org/jruby/java/MiniJava.java b/src/org/jruby/java/MiniJava.java
index 15c43ab..bc7a13b 100644
--- a/src/org/jruby/java/MiniJava.java
+++ b/src/org/jruby/java/MiniJava.java
@@ -358,6 +358,9 @@ public class MiniJava implements Library {

October 29, 2008
5:13PM EDT
by headius

◆ cat app/models/foo.rb 
module A
  class B; end
end

Next page

Previous page