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
cc `llvm-config --cflags` -c sum.c | |
c++ `llvm-config --cxxflags --ldflags --libs core mcjit native --system-libs` sum.o -o sum |
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
#!/usr/bin/env macruby -wKU | |
framework 'Foundation' | |
## first example reject works great | |
new_array = ["test", "test 1", "Test 2", "Test 3", 10].reject {|test| test.is_a?(Fixnum) } | |
p new_array | |
## second example it still showing tweets with iso_language_code == en |
This is a report for Issue #73
There seems to be a problem with a large index. I have >95k items in the index. As you know, a simple example of indexing and searching already works pretty well. Therefore I assume the larger dataset is causing problems with MacRuby.
In this Gist you will find the sources except the datafile.
Please download symbols.marshal
and Utf8Symbol.rb
to the same folder as test.rb
before you try.
I am using MacRuby latest nightly at the time of writing. I also assume that you have done sudo macgem install picky
.
$ macruby -v
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 <Foundation/Foundation.h> | |
#import <MacRuby/MacRuby.h> | |
int main(void) | |
{ | |
id fooClass; | |
id foo; | |
[[MacRuby sharedRuntime] evaluateFileAtPath:@"test.rb"]; | |
fooClass = [[MacRuby sharedRuntime] evaluateString:@"Foo"]; |
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 <Foundation/Foundation.h> | |
#import <objc/runtime.h> | |
#import <MacRuby/MacRuby.h> | |
@interface NSObject (MRAssociatedObjects) | |
- (id)associatedObjectForSymbol:(NSString *)rubySymbolName; | |
- (void)setAssociatedObject:(id)value forSymbol:(NSString *)rubySymbolName; | |
@end | |
@implementation NSObject (MRAssociatedObjects) |
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/load.c b/load.c | |
index 06ca712..92ae5d7 100644 | |
--- a/load.c | |
+++ b/load.c | |
@@ -267,6 +267,21 @@ rb_require_safe(VALUE fname, int safe) | |
{ | |
FilePathValue(fname); | |
+ char *p = strrchr(RSTRING_PTR(fname), '.'); | |
+ if (p != NULL && strcmp(p + 1, "so") == 0) { |
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/array.c b/array.c | |
index b4a1c7f..ac31015 100644 | |
--- a/array.c | |
+++ b/array.c | |
@@ -1203,14 +1203,10 @@ rary_dup(VALUE ary, SEL sel) | |
} | |
assert(rb_klass_is_rary(klass)); | |
- VALUE dup = rary_copy(ary, klass); | |
+ VALUE dup = rary_alloc(klass, 0); |