Skip to content

Instantly share code, notes, and snippets.

@jonforums
jonforums / gist:340718
Created March 23, 2010 00:20
Benchmark big reads
# redmine.ruby-lang.org issue #2742
require 'benchmark'
begin
require 'rbconfig'
puts "(#{RbConfig::CONFIG['host_os']}) #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} \
#{RbConfig::CONFIG['CC']} #{RbConfig::CONFIG['optflags']} #{RbConfig::CONFIG['debugflags']}"
rescue LoadError
end
@jonforums
jonforums / gist:340719
Created March 23, 2010 00:22
Benchmark big write
# redmine.ruby-lang.org issue #2742
require 'benchmark'
begin
require 'rbconfig'
puts "(#{RbConfig::CONFIG['host_os']}) #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} \
#{RbConfig::CONFIG['CC']} #{RbConfig::CONFIG['optflags']} #{RbConfig::CONFIG['debugflags']}"
rescue LoadError
end
@jonforums
jonforums / dk.rb
Created July 16, 2010 21:21
DevKit install helper script
require 'win32/registry'
require 'yaml'
require 'fileutils'
module DevKitInstaller
DEVKIT_ROOT = File.expand_path(File.dirname(__FILE__))
REG_KEYS = [
'Software\RubyInstaller\MRI',
diff --git a/config/ruby_installer.rb b/config/ruby_installer.rb
index cc18270..c8db950 100644
--- a/config/ruby_installer.rb
+++ b/config/ruby_installer.rb
@@ -226,7 +226,7 @@ module RubyInstaller
:release => 'official',
:version => '1.3.7',
:url => 'http://rubyforge.org/frs/download.php/70696',
- :checkout => 'http://rubygems.rubyforge.org/svn/trunk',
+ :checkout => 'git://github.com/rubygems/rubygems.git',
@jonforums
jonforums / 0001-allow-trunk-build-with-rubygems.patch
Created July 26, 2010 13:54
Allow Ruby trunk build with Rubygems
diff --git a/config/ruby_installer.rb b/config/ruby_installer.rb
index cc18270..c6834c9 100644
--- a/config/ruby_installer.rb
+++ b/config/ruby_installer.rb
@@ -226,7 +226,7 @@ module RubyInstaller
:release => 'official',
:version => '1.3.7',
:url => 'http://rubyforge.org/frs/download.php/70696',
- :checkout => 'http://rubygems.rubyforge.org/svn/trunk',
+ :checkout => 'http://github.com/rubygems/rubygems.git',
@jonforums
jonforums / 0001-enable-llvm-gcc-vim-builds.patch
Created August 7, 2010 17:51
Enable LLVM-GCC to build gvim and vim
diff --git a/src/GvimExt/Make_ming.mak b/src/GvimExt/Make_ming.mak
--- a/src/GvimExt/Make_ming.mak
+++ b/src/GvimExt/Make_ming.mak
@@ -33,7 +33,7 @@
endif
endif
CXX := $(CROSS_COMPILE)g++
-WINDRES := $(CROSS_COMPILE)windres
+WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED
LIBS := -luuid
@jonforums
jonforums / 0001-build-with-jruby.patch
Created August 18, 2010 18:58
Build RubyInstaller 1.9 with JRuby patch
diff --git a/recipes/interpreter/ruby19.rake b/recipes/interpreter/ruby19.rake
index 755f644..b63d1b8 100644
--- a/recipes/interpreter/ruby19.rake
+++ b/recipes/interpreter/ruby19.rake
@@ -83,8 +83,10 @@ namespace(:interpreter) do
end
end
+ ruby_impl = Gem.ruby
+
@jonforums
jonforums / fix-dynamic-ruby-1.9.2-with-vim-7.3.patch
Created August 23, 2010 18:37
Allow Vim 7.3 to dynamically load Ruby 1.9.2
# HG changeset patch
# Parent 4fb4cdadf9a156a82520e860103b327ab0c75e44
patch dynamic ruby interface
diff --git a/src/if_ruby.c b/src/if_ruby.c
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -4,6 +4,7 @@
*
* Ruby interface by Shugo Maeda
diff --git a/syntax/ruby.vim b/syntax/ruby.vim
index ece2f4f..283f04e 100644
--- a/syntax/ruby.vim
+++ b/syntax/ruby.vim
@@ -253,7 +253,7 @@ endif
" Special Methods
if !exists("ruby_no_special_methods")
- syn keyword rubyAccess public protected private module_function
+ syn keyword rubyAccess public protected private module_function private_class_method
@jonforums
jonforums / 0001-update-convenience-gem-override.patch
Created September 1, 2010 17:59
Overwrite the new missing DevKit convenience message gem override upon DK install
diff --git a/resources/devkit/dk.rb b/resources/devkit/dk.rb
index e04c1dd..b1bc04a 100644
--- a/resources/devkit/dk.rb
+++ b/resources/devkit/dk.rb
@@ -271,9 +271,15 @@ EOT
if File.exist?(target)
content = File.read(target)
- unless content.include?('DevKit')
+ case