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 ruby | |
# little hack to help setting up test repos for my experiments | |
# SETUP gem install thor | |
require 'thor' | |
class Gitter < Thor | |
include Thor::Actions | |
REPO = "orig-repo" | |
UNIREPO = "uni-repo" |
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
## jruby-users question "Overriding A Method For A Specific Instance" - | |
####### See: http://markmail.org/thread/emm5h6psqi4z3leq | |
## | |
#### Start this with jruby -rgdx.jar gdx_listener_hack.rb | |
### | |
#### where gdx is coming from http://libgdx.badlogicgames.com/releases/libgdx-1.0.1.zip | |
java_import "com.badlogic.gdx.scenes.scene2d.InputListener" | |
############### from email: |
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
package bug; | |
public abstract class AbstractRunnable implements Runnable { | |
public void run() { | |
System.out.println("calling into ruby:"); | |
doRun(); | |
System.out.println("calling into ruby: finished"); | |
} | |
protected abstract void doRun(); | |
} |
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
package bug; | |
import java.util.List; | |
public class Food { | |
public final String name; | |
public final int amount; | |
public Food(String name, int amount) { | |
this.name = name; | |
this.amount = amount; |
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
class A | |
def f(x = :default) | |
warn "#{self.class} super f(#{x})" | |
x | |
end | |
end | |
class B < A | |
define_method :f do |x| | |
super |