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/kernel/common/array.rb b/kernel/common/array.rb | |
index 58370be..e213ff9 100644 | |
--- a/kernel/common/array.rb | |
+++ b/kernel/common/array.rb | |
@@ -181,179 +181,6 @@ class Array | |
alias_method :slice, :[] | |
- def set_index(index, ent, fin=undefined) | |
- Rubinius.primitive :array_aset |
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
rake build | |
/Users/epeterson/.rvm/rubies/ruby-1.9.2-p290/bin/ruby vm/codegen/field_extract.rb vm/builtin/basicobject.hpp vm/builtin/object.hpp vm/builtin/integer.hpp vm/builtin/fixnum.hpp vm/builtin/array.hpp vm/builtin/bignum.hpp vm/builtin/executable.hpp vm/builtin/access_variable.hpp vm/builtin/alias.hpp vm/builtin/block_environment.hpp vm/builtin/block_as_method.hpp vm/builtin/bytearray.hpp vm/builtin/chararray.hpp vm/builtin/io.hpp vm/builtin/channel.hpp vm/builtin/module.hpp vm/builtin/class.hpp vm/builtin/compiledmethod.hpp vm/builtin/data.hpp vm/builtin/dir.hpp vm/builtin/exception.hpp vm/builtin/float.hpp vm/builtin/immediates.hpp vm/builtin/iseq.hpp vm/builtin/list.hpp vm/builtin/lookuptable.hpp vm/builtin/ffi_pointer.hpp vm/builtin/methodtable.hpp vm/builtin/nativefunction.hpp vm/builtin/packed_object.hpp vm/builtin/randomizer.hpp vm/builtin/regexp.hpp vm/builtin/staticscope.hpp vm/builtin/string.hpp vm/builtin/symbol.hpp vm/builtin/thread.hpp vm/builtin/tuple.hpp vm/builtin/compactlookuptable.hpp v |
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' | |
STRING = 'abc' | |
ITERATIONS = 500000 | |
Benchmark.bm(10) do |bench| | |
for n in [2,3,4, 5] | |
n_strings = Array.new(n, STRING) | |
bench.report("add #{n}") do |
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
["US-ASCII", "ASCII-8BIT", "UTF-8"].each do |encoding| | |
Encoding.default_internal = encoding | |
puts "With #{encoding} default internal:" | |
[127, 255, 256].each do |number| | |
no_arg = number.chr.encoding rescue "out of range" | |
puts "#{number}.chr is: #{no_arg}" | |
with_arg = number.chr(encoding).encoding rescue "out of range" | |
puts "#{number}.chr('#{encoding}') is: #{with_arg}" | |
end |
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
Terminal 1: | |
$ bundle exec spork | |
Using RSpec | |
Loading Spork.prefork block... | |
Spork is ready and listening on 8989! | |
Running tests with args ["--color", "--fail-fast", "--failure-exit-code", "2", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/epeterson/.rvm/gems/rbx-head/gems/guard-rspec-0.6.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]... | |
Done. | |
[1] 70450 killed bundle exec spork |
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
Terminal 1: | |
$ bundle exec spork | |
Using RSpec | |
Loading Spork.prefork block... | |
Spork is ready and listening on 8989! | |
Running tests with args ["--color", "--fail-fast", "--failure-exit-code", "2", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/epeterson/.rvm/gems/ruby-1.9.3-p125-perf@exact/gems/guard-rspec-0.6.0/lib/guard/rspec/formatters/notification_rspec.rb", "spec"]... | |
Done. | |
[1] 70757 killed bundle exec spork |
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
Failures: | |
1) Foo timestamp | |
Failure/Error: its(:timestamp) { should eql timestamp } | |
expected: Tue, 15 May 2012 19:06:00 UTC +00:00 | |
got: Tue, 15 May 2012 19:06:00 UTC +00:00 | |
(compared using eql?) | |
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
irb(main):001:0> "Caches".singularize | |
=> "Cach" |
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
psql (9.1.3) | |
Type "help" for help. | |
dev=# select now(); | |
now | |
------------------------------- | |
2013-03-28 14:27:28.820854-04 | |
(1 row) | |
dev=# select now(); |
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 'spec_helper' | |
describe GamesController do | |
describe 'POST "create"' do | |
subject(:response) { post :create, params } | |
context 'valid parameters provided' do | |
let(:params) { { game: FactoryGirl.attributes_for(:game) } } | |
specify { expect { subject }.to change(Game, :count).by 1 } |