This file contains hidden or 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.HashMap | |
import java.util.Map | |
class Params | |
def initialize(request:HttpServletRequest) | |
@request = request | |
@params = HashMap.new | |
end | |
def get(name:String) |
This file contains hidden or 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.io.IOException | |
import javax.servlet.http.HttpServlet | |
import com.google.apphosting.api.ApiProxy | |
import com.google.apphosting.api.ApiProxy.Environment | |
class Plain < HttpServlet | |
def doGet(req:HttpServletRequest, resp:HttpServletResponse); throws IOException | |
env = ApiProxy.getCurrentEnvironment | |
raw_ver = env.getVersionId | |
version = raw_ver.substring 0, raw_ver.lastIndexOf(".") |
This file contains hidden or 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 'openid' | |
require 'net/http' | |
require 'appengine-apis/urlfetch' | |
class MyFetcher < OpenID::StandardFetcher | |
def fetch(url, body=nil, headers=nil, redirect_limit=REDIRECT_LIMIT) | |
raise OpenID::FetchingError, "Blank URL: #{url}" if url.blank? | |
headers ||= {} | |
headers['User-agent'] ||= USER_AGENT |
This file contains hidden or 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
diff --git a/src/org/jruby/compiler/JITCompiler.java b/src/org/jruby/compiler/JITCompiler.java | |
index c1bc58a..3fb2faa 100644 | |
--- a/src/org/jruby/compiler/JITCompiler.java | |
+++ b/src/org/jruby/compiler/JITCompiler.java | |
@@ -190,6 +190,7 @@ public class JITCompiler implements JITCompilerMBean { | |
private String className; | |
private String filename; | |
private String methodName; | |
+ private String key; | |
This file contains hidden or 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 "date" | |
puts "appengine gem versions: #{Time.now}" | |
cmd = "gem list | grep appengine" | |
#puts cmd | |
gems = `#{cmd}`.split("\n").collect{|v| v.strip }.sort | |
gems.each do |gem| | |
if gem =~ /^(\S+) \((.+)\)$/ | |
name = $1 | |
versions = $2.split(",").collect{|v| v.strip }.sort |
This file contains hidden or 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
~/projects/jruby ➔ jruby -J-Djruby.jit.threshold=0 -J-Djruby.jit.codeCache=`pwd`/codecache -e "load 'test/mri/sample/test.rb'" | |
assignment : ..................................................................................................................................................................................................................................................................................................................................................................condition : ..if/unless : ...case : .....while/until : ........exception : .......array : .......................................hash : ...........................iterator : .........................................................................................float : ................................................................................bignum : ...............................string & char : ..............................................................assignment : ..........call : ......proc : .........eval : .. |
This file contains hidden or 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
def foo(a:int[]) | |
a.each {|x| x += 1;puts x; redo if x == 2} | |
end |