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
q_default = Dispatch::Queue.concurrent | |
q_sum = Dispatch::Queue.new("com.example.sum") | |
sum = 0 | |
q_default.apply(10) do |i| | |
puts("i: #{i}") | |
sleep(1) | |
x = i + 1 | |
q_sum.dispatch(false, &lambda { | |
puts("x: #{x}") |
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/class.c b/class.c | |
index ed7ccaf..e4bdceb 100644 | |
--- a/class.c | |
+++ b/class.c | |
@@ -1003,7 +1003,7 @@ name_to_sel(const char *name, const int arity) | |
return sel_registerName(name); | |
} | |
-static void | |
+static rb_vm_method_node_t * |
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/rakelib/builder.rake b/rakelib/builder.rake | |
index 79e3e41..e3f2ecb 100644 | |
--- a/rakelib/builder.rake | |
+++ b/rakelib/builder.rake | |
@@ -328,7 +328,8 @@ INSTRUBY_ARGS = "#{SCRIPT_ARGS} --data-mode=0644 --prog-mode=0755 --installed-li | |
EXTENSIONS = ['ripper', 'digest', 'etc', 'readline', 'libyaml', 'fcntl', 'socket', 'zlib', 'bigdecimal', 'openssl'].sort | |
def perform_extensions_target(target) | |
- EXTENSIONS.map { |x| File.join('ext', x) }.each do |ext_dir| | |
+ target_extensions = (ENV['EXTS'] && ENV['EXTS'].split or EXTENSIONS) |
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
(load "time-stamp") | |
(defun insert-time-stamp () | |
(interactive) | |
(insert (time-stamp-string))) | |
(defun my-insert-time () | |
(interactive) | |
(insert (format-time-string "%Y-%m-%d %H:%M:%S"))) | |
(global-set-key "\C-c\C-t" 'my-insert-time) |
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 7cf2d4a..3f70acc 100644 | |
--- a/array.c | |
+++ b/array.c | |
@@ -50,7 +50,7 @@ rary_reserve(VALUE ary, size_t newlen) | |
for (size_t i = 0; i < rary->len; i++) { | |
GC_WB(&new_elements[i], rary->elements[i]); | |
} | |
- GC_WB(&ary->elements, new_elements); | |
+ GC_WB(&rary->elements, new_elements); |
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/signal.c b/signal.c | |
index 12b25f1..4d891b5 100644 | |
--- a/signal.c | |
+++ b/signal.c | |
@@ -20,8 +20,10 @@ | |
#include "vm.h" | |
#include <signal.h> | |
#include <stdio.h> | |
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 | |
#include <dispatch/dispatch.h> |
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
cymric$ /usr/bin/rake | |
(in /Users/kouji/work/MacRuby/MacRuby-git) | |
/usr/bin/ruby tool/compile_prelude.rb prelude.rb miniprelude.c.new | |
./miniruby -I. -I./lib bin/rubyc --internal --arch i386 --arch x86_64 -C "rbconfig.rb" -o "./rbconfig.rbo" | |
unknown: [BUG] Segmentation fault | |
MacRuby version 0.6 (ruby 1.9.0) [universal-darwin9.0, x86_64] |
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
class String | |
def -(val) | |
if TIME_RE =~ self && TIME_RE =~ val | |
if self.length == 8 || val.length == 8 | |
with_sec = true | |
end | |
require "time" | |
d = Time.parse(self) - Time.parse(val) | |
sec = d % 60 | |
min = (d / 60) % 60 |
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/misc/xcode-templates/File Templates/MacRuby/Ruby File.pbfiletemplate/TemplateInfo.plist b/misc/xcode-templates/File Templates/MacRuby/Ruby File.pbfiletemplate/TemplateInfo.plist | |
new file mode 100644 | |
index 0000000..7ad506c | |
--- /dev/null | |
+++ b/misc/xcode-templates/File Templates/MacRuby/Ruby File.pbfiletemplate/TemplateInfo.plist | |
@@ -0,0 +1,4 @@ | |
+{ | |
+ MainTemplateFile = "file.rb"; | |
+ Description = "An empty Ruby file."; | |
+} |
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
----- main.rb | |
require 'dxruby' | |
require './player' | |
player = Player.new | |
Window.loop do | |
break if Input.keyPush?(K_ESCAPE) | |
player.move |
OlderNewer