-
jobs=1 (7 minutes 32 seconds)
-
jobs=2 (4 minutes 31 seconds)
-
jobs=4 (4 minutes 20 seconds)
-
new (2 minutes 7 seconds)
This file contains 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
require 'benchmark' | |
Benchmark.bmbm do |bench| | |
regexp = /s$/i | |
empty = '' hash = { | |
'boxes' => 'box', | |
'windows' => 'window', 'buttons' => 'button', | |
'Buttons' => 'button', | |
'dialogs' => 'dialog' | |
} |
This file contains 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
require 'benchmark' | |
Benchmark.bmbm do |bench| | |
url = NSURL.URLWithString('http://macruby.org/') | |
set = NSSet.setWithArray([1,2,3]) | |
bundle = NSBundle.mainBundle | |
freq = 100_000 | |
bench.report('url#inspect') do |x| |
This file contains 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/lib/rubygems/specification.rb b/lib/rubygems/specification.rb | |
index e873923..392c91b 100644 | |
--- a/lib/rubygems/specification.rb | |
+++ b/lib/rubygems/specification.rb | |
@@ -1921,12 +1921,12 @@ class Gem::Specification | |
end | |
def to_yaml(opts = {}) # :nodoc: | |
- if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck? then | |
+ # XXX MACRUBY does not have syck, but does not have YAML::ENGINE either |
This file contains 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/lib/rubygems.rb b/lib/rubygems.rb | |
index 567fb07..85a4995 100644 | |
--- a/lib/rubygems.rb | |
+++ b/lib/rubygems.rb | |
@@ -6,8 +6,9 @@ | |
#++ | |
module Gem | |
- QUICKLOADER_SUCKAGE = RUBY_VERSION =~ /^1\.9\.1/ | |
- GEM_PRELUDE_SUCKAGE = RUBY_VERSION =~ /^1\.9\.2/ |
This file contains 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
○ macirb | |
irb(main):001:0> framework 'Cocoa' | |
=> true | |
irb(main):002:0> a = (0..10).to_a | |
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
irb(main):003:0> a.subarrayWithRange(0..10) | |
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
irb(main):004:0> a.slice(0..10) | |
=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
irb(main):005:0> |
This file contains 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
require 'rubygems' | |
require 'jiraSOAP' | |
# I changed the URL and credentials as they are sensitive infos | |
$db = JIRA::JIRAService.new 'http://jira.domain.com:8080' | |
$db.login 'mark', 'password' | |
at_exit { $db.logout } | |
def bench_it issues, iterations | |
times = [] |
This file contains 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
require 'benchmark' | |
Benchmark.bmbm do |x| | |
x.report 'direct call' do | |
1_000_000.times do | |
x = true | |
x.nil? |
This file contains 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
require 'rubygems' | |
gem 'minitest', '>= 2.3.1' | |
require 'minitest/autorun' | |
require 'minitest/benchmark' | |
require 'json' | |
framework 'Foundation' | |
class Bench < MiniTest::Unit::TestCase | |
def self.order | |
:alpha |
This file contains 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
require 'rubygems' | |
gem 'minitest', '>= 2.2' | |
require 'minitest/autorun' | |
require 'minitest/benchmark' | |
class BenchMethodToProc < MiniTest::Unit::TestCase | |
def self.test_order | |
:alpha | |
end |