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
... similar errors elided ... | |
16) Error: | |
test_writing_with_not_nullable_column_encoded_with_JSON(StoreTest): | |
ActiveRecord::SerializationTypeMismatch: Attribute was supposed to be a ActiveSupport::HashWithIndifferentAccess, but was a Hash | |
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/coders/yaml_column.rb:34:in `load' | |
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/serialization.rb:38:in `unserialize' | |
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/serialization.rb:29:in `unserialized_value' | |
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/serialization.rb:19:in `type_cast' |
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
<build> | |
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
</resource> | |
<resource> | |
<directory>src/main/ruby</directory> | |
</resource> | |
</resources> | |
... |
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
# Implements some part of the Servlet API in Ruby. Does not extend | |
# javax.servlet.http.HttpServlet, but implements javax.servlet.Servlet | |
class MyServlet | |
include Java::JavaxServlet::Servlet | |
# @param [javax.servlet.ServletConfig] servletConfig | |
def init(servletConfig) | |
end | |
def destroy |
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
# Runs maven if we are a JRuby process. Currently not used. | |
# | |
# See http://watchitlater.com/blog/2011/08/jruby-rake-and-maven/ | |
def mvn(*args) | |
mvn = catch(:mvn) do | |
ENV['PATH'].split(::File::PATH_SEPARATOR).each do |path| | |
Dir.glob(::File.join(path, 'mvn')).each do |file| | |
if ::File.executable?(file) | |
throw :mvn, if ::File.symlink?(file) | |
::File.readlink(file) |
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
#!/bin/sh | |
# | |
# bundle_exec.sh - emulate 'bundle exec' but with a shell script | |
# rather than a ruby script. Modifies the environment just like | |
# bundle exec would. | |
# | |
# Running "bundle exec ruby" starts a ruby in which then execs the | |
# command, 'ruby'. In JRuby 1.6, the command is started in a child | |
# process. When using a Foreman-like tool that has the ability to | |
# kill and/or restart such a command, only the parent will be killed |
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
GEM | |
remote: http://rubygems.org/ | |
specs: | |
activemodel (3.2.8) | |
activesupport (= 3.2.8) | |
builder (~> 3.0.0) | |
activerecord (3.2.8) | |
activemodel (= 3.2.8) | |
activesupport (= 3.2.8) | |
arel (~> 3.0.2) |
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
require 'java' | |
require 'benchmark' | |
s = Java::JavaLang::String.new('hello') | |
n = 10000000 | |
respond_task = proc { n.times { s.respond_to?(:to_s) || abort('error') } } | |
no_respond_task = proc { n.times { s.respond_to?(:no_method) && abort('error') } } | |
kind_of_task = proc { n.times { s.kind_of?(Java::JavaLang::String) || abort('error') } } | |
no_kind_of_task = proc { n.times { s.kind_of?(Java::JavaLang::Integer) && abort('error') } } |
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
public class Time { | |
private final long timeInMillis; | |
private final long nsec; | |
public Time(long timeInMillis, long nsec) { | |
this.timeInMillis = timeInMillis; | |
this.nsec = nsec; | |
} |
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
this SunJCE_y (id=144) | |
arg0 true | |
arg1 "DESede/CBC/PKCS5Padding" (id=249) | |
arg2 (id=254) |
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
Rails 3.1.8 app in Ruby 1.8 compatibility mode with ~65 dependencies | |
(not sure how many in total including | |
transient deps) was timed up to the Bundler.require line in config/application.rb | |
(JRuby 1.7.0) | |
Before: 18.8 seconds | |
After: 15.9 seconds | |
This likely seriously breaks the semantics of 'require', and maybe isn't faster | |
enough to be worth it. |
OlderNewer