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
| <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5"> | |
| <context-param> | |
| <param-name>public.root</param-name> | |
| <param-value>/public</param-value> | |
| </context-param> | |
| <context-param> | |
| <param-name>merb.root</param-name> | |
| <param-value>/</param-value> | |
| </context-param> |
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
| // Generated from rack.duby | |
| package com.google.appengine.jruby; | |
| public class LazyApplicationFactory extends java.lang.Object implements org.jruby.rack.RackApplicationFactory { | |
| private org.jruby.rack.RackContext context = null; | |
| private org.jruby.rack.SharedRackApplicationFactory factory = null; | |
| public LazyApplicationFactory() { | |
| } | |
| public void init(org.jruby.rack.RackContext context) throws org.jruby.rack.RackInitializationException { | |
| this.context = context; | |
| } |
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 'appengine-rack' | |
| require 'appengine-rack/java' | |
| # TODO: Fill in your app id | |
| AppEngine::Rack.app.configure(:application => '', :version => '1') | |
| run JavaServlet.new('DubyApp') |
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 |
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/java/org/jruby/ext/openssl/Cipher.java b/src/java/org/jruby/ext/openssl/Cipher.java | |
| index 49eef78..b3385e3 100644 | |
| --- a/src/java/org/jruby/ext/openssl/Cipher.java | |
| +++ b/src/java/org/jruby/ext/openssl/Cipher.java | |
| @@ -167,7 +167,7 @@ public class Cipher extends RubyObject { | |
| return ((Boolean) (OpenSSLReal.getWithBCProvider(new Callable() { | |
| public Object call() { | |
| try { | |
| - javax.crypto.Cipher.getInstance(rubyToJavaCipher(rubyName, null)[3], OpenSSLReal.PROVIDER); | |
| + javax.crypto.Cipher.getInstance(rubyToJavaCipher(rubyName, null)[3]); |
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
| module Enumerable | |
| defmacro :all?(&block) do |duby, call| | |
| block = call.block || duby.block {|x| x} | |
| all = duby.tmp # returns a unique name | |
| block.body = duby.eval do | |
| # backticks refernce AST Nodes from the surrounding scope | |
| unless `block.body` | |
| `all` = false | |
| break | |
| end |
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, resp); 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
| import org.jruby.rack.DefaultRackApplicationFactory | |
| import org.jruby.rack.RackApplicationFactory | |
| import org.jruby.rack.RackInitializationException | |
| import org.jruby.rack.RackServletContextListener | |
| import org.jruby.rack.SharedRackApplicationFactory | |
| class AppEngineRackApplicationFactory < DefaultRackApplicationFactory | |
| def initialize | |
| end |
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 javax.servlet.http.HttpServlet | |
| import com.google.appengine.ext.duby.db.Model | |
| class Posts < Model | |
| property title, String | |
| property contents, Text | |
| end | |
| import com.google.json.JsonSerializer |
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
| a = 'foo' | |
| defmacro mymacro do | |
| a # This should be a vcall, not a local | |
| end |
OlderNewer