Skip to content

Instantly share code, notes, and snippets.

irb(main):003:0> class LoadError
irb(main):004:1> def message
irb(main):005:2> super + 'hello'
irb(main):006:2> end
irb(main):007:1> end
=> nil
irb(main):008:0> require 'rubygems'
=> false
irb(main):009:0> require 'sinatra'
LoadError: no such file to load -- sinatra
# Monkey-patch LoadError's message to include the current $LOAD_PATH.
class LoadError
def initialize(*args)
super
@path = $LOAD_PATH.dup
end
def message
if $servlet_context && $servlet_context.get_init_parameter('rack.load.path.debug') == 'true'
$servlet_context.log("Current path:\n" + @path.join("\n"))
<-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<!--
<Connector
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
SSLCertificateFile="/usr/local/ssl/server.crt"
SSLCertificateKeyFile="/usr/local/ssl/server.pem"
clientAuth="optional" SSLProtocol="TLSv1"/>
-->
jdev cases/validations/length_validation_test.rb
/Users/david/dev/jruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3.2-java/lib/ruby-debug-base.rb:214 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
Loaded suite cases/validations/length_validation_test
Started
....F...........F..F.F.F....
Finished in 1.08 seconds.
1) Failure:
test_optionally_validates_length_of_using_within_utf8(LengthValidationTest)
[cases/validations/length_validation_test.rb:295:in `test_optionally_validates_length_of_using_within_utf8'
alter table remote_service add remoteServiceType varchar(50) not null;
update remote_service set remoteServiceType = 'VIRTUAL_FACTORY' where idRemoteServiceType = 1;
update remote_service set remoteServiceType = 'STORAGE_SYSTEM_MONITOR' where idRemoteServiceType = 2;
update remote_service set remoteServiceType = 'VIRTUAL_SYSTEM_MONITOR' where idRemoteServiceType = 3;
update remote_service set remoteServiceType = 'NODE_COLLECTOR' where idRemoteServiceType = 4;
update remote_service set remoteServiceType = 'DHCP_SERVICE' where idRemoteServiceType = 5;
alter table remote_service drop foreign key idRemoteServiceType_FK1;
alter table remote_service drop column idRemoteServiceType;
drop table remote_service_type;
require 'java'
require 'spec'
describe "java.lang.System" do
it "mocks getProperty" do
java.lang.System.stub!(:getProperty).and_return 'foo'
java.lang.System.getProperty('bar').should == 'foo'
end
end
str = StringSpecs::MyString.new('foo_bar')
str.send(@method, /(foo)_bar/)
$1.should be_instance_of(StringSpecs::MyString)
NoMethodError: undefined method `be_instance_of' for #<Object:0x10042f080 @method=:match>
/Users/david/dev/rubyspec/core/string/shared/match.rb:6
require 'java'
require 'jruby/ext'
class Foo
include JRuby::Extensions
def foo; 1; end
end
Foo.method(:foo).args
diff --git a/src/org/jruby/ast/executable/RuntimeCache.java b/src/org/jruby/ast/executable/RuntimeCache.java
index 73effad..2f114a8 100644
--- a/src/org/jruby/ast/executable/RuntimeCache.java
+++ b/src/org/jruby/ast/executable/RuntimeCache.java
@@ -135,8 +135,9 @@ public class RuntimeCache {
public final RubyRegexp cacheRegexp(int index, RubyString pattern, int options) {
RubyRegexp regexp = regexps[index];
- if (regexp == null) {
- regexp = RubyRegexp.newRegexp(pattern.getRuntime(), pattern.getByteList(), options);
[david@calavera:voldemort-0.81]$ jdev -S jirb
no such file to load -- wirble
jruby-1.5.1 > require 'lib/voldemort_client'
=> true