Skip to content

Instantly share code, notes, and snippets.

View bluescreen303's full-sized avatar

Mathijs Kwik bluescreen303

  • Uithoorn, Netherlands
View GitHub Profile
diff -urN aub-record_filter-0.9.6/lib/record_filter/conjunctions.rb aub-record_filter-0.9.6-force_alias/lib/record_filter/conjunctions.rb
--- aub-record_filter-0.9.6/lib/record_filter/conjunctions.rb 2009-06-03 15:47:44.000000000 +0200
+++ aub-record_filter-0.9.6-force_alias/lib/record_filter/conjunctions.rb 2009-06-03 15:45:32.000000000 +0200
@@ -19,7 +19,7 @@
when DSL::Conjunction
result.add_conjunction(create_from(step, table))
when DSL::Join
- join = result.add_join_on_association(step.association, step.join_type)
+ join = result.add_join_on_association(step.association, step.join_type, step.force_alias)
result.add_conjunction(create_from(step.conjunction, join.right_table))
class Group < ActiveRecord::Base
has_many :memberships, :dependent => :destroy
has_many :users, :through => :memberships
named_filter :moderated do
having(:memberships).with(:state, 'moderator')
end
named_filter :with_pending_memberships do
having(:memberships).with(:state, 'pending')
commit ed7b0029a324558d0da1d0521b7a29949448b6f1
Author: Mathijs Kwik <mk@dutchcoastsoftware.com>
Date: Tue May 26 18:17:10 2009 +0200
rescue when user context got removed
diff --git a/app/controllers/user_context_handler.rb b/app/controllers/user_context_handler.rb
index 5ebc2db..d74eb97 100644
--- a/app/controllers/user_context_handler.rb
+++ b/app/controllers/user_context_handler.rb
diff -urN ruby-1.9.1-p129/array.c ruby-1.9.1-p129-putstringfix-22395/array.c
--- ruby-1.9.1-p129/array.c 2009-05-04 14:30:55.000000000 +0200
+++ ruby-1.9.1-p129-putstringfix-22395/array.c 2009-07-13 22:47:07.000000000 +0200
@@ -1457,6 +1457,12 @@
return dup;
}
+VALUE
+rb_ary_resurrect(VALUE ary)
+{
RubyArray = new JS.Class({
include: JS.Enumerable,
initialize: function(ary) {
this._ary = ary;
},
forEach: function(block, context) {
if (!block) return this.enumFor('forEach');
for (var i = 0, n = this._ary.length; i < n; i++)
--- arguments.rb 2009-08-06 11:59:27.000000000 +0200
+++ arguments-fix.rb 2009-08-06 11:59:16.000000000 +0200
@@ -68,21 +68,25 @@
if argv[i] == "--config"
argv.delete_at( i )
configs << argv.delete_at(i)
+ next
end
if argv[i] == "-e" || argv[i] == "--env"
// map function
function(op) {
if(op.channel) {
emit(op.channel, op);
}
}
// reduce
function(keys, ops, rereduce) {
I have a java method that requires one or more classes:
public class FlagBinder {
public static Module parseFlags(String[] args, Class<?>... flagSettings) throws ParseException {
I tried different kinds of combinations of .java_class, .to_java but couldn't get it working.
Java code that uses this class does this:
Module flags = FlagBinder.parseFlags(args, FlagSettings.class);
Now in ruby I tried:
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jruby.javasupport.proxy.JavaProxyClassFactory.invokeDefineClass(JavaProxyClassFactory.java:256)
at org.jruby.javasupport.proxy.JavaProxyClassFactory.generate(JavaProxyClassFactory.java:221)
at org.jruby.javasupport.proxy.JavaProxyClassFactory.newProxyClass(JavaProxyClassFactory.java:174)
at org.jruby.javasupport.proxy.JavaProxyClass.getProxyClass(JavaProxyClass.java:122)
at org.jruby.javasupport.proxy.JavaProxyClass.get_with_class(JavaProxyClass.java:693)
at org.jruby.javasupport.Java$5.call(Java.java:580)
org.eclipse.core.internal.resources.ResourceException: The resource tree is locked for modifications.
at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:115)
at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:1747)
at org.eclipse.core.internal.resources.Resource.deleteMarkers(Resource.java:762)
at net.sf.eclipsefp.haskell.scion.client.ScionInstance.deleteProblems(ScionInstance.java:283)
at net.sf.eclipsefp.haskell.scion.client.ScionInstance.buildProject(ScionInstance.java:141)