diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 45b7717..0000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2012 Aditya Bhargava - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/VERSION b/VERSION deleted file mode 100644 index b1e80bb..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.1.3 diff --git a/test.rb b/benchmarks/bench.rb similarity index 100% rename from test.rb rename to benchmarks/bench.rb diff --git a/hash_test.rb b/benchmarks/wrap_test.rb similarity index 100% rename from hash_test.rb rename to benchmarks/wrap_test.rb diff --git a/class_eval_test.rb b/class_eval_test.rb deleted file mode 100644 index 46a9368..0000000 --- a/class_eval_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'benchmark' - -module Bar - def go - @val ||= {} - class << self; attr_accessor :val; end - p self - p self.val - end -end - -class Baz - extend Bar -end - -Baz.go - -p Baz -p Baz.val - -exit - -class Caller - def initialize(method) - @method = method - end - - def call_with(*args, &blk) - @method.call(*args, &blk) - end -end - -class Foo -def add a, b - a + b -end - -class_eval %{ - def evaled_add a, b - method(:add).call(a, b) - end -} -end - -f = Foo.new -c = Caller.new(f.method(:add)) - -Benchmark.bm 30 do |x| - x.report 'add' do - 100000.times do |_| - f.add(rand(1000), rand(1000)) - end - end - x.report 'evaled_add' do - 100000.times do |_| - f.evaled_add(rand(1000), rand(1000)) - end - end - x.report 'caller object' do - 100000.times do |_| - c.call_with(rand(1000), rand(1000)) - end - end -end diff --git a/functest.rb b/functest.rb deleted file mode 100644 index c997b98..0000000 --- a/functest.rb +++ /dev/null @@ -1,8 +0,0 @@ -require './lib/contracts' -include Contracts - -Contract None => nil -def add -end - -p add