Skip to content

Commit

Permalink
Add Travis CI.
Browse files Browse the repository at this point in the history
Big-O will support MRI but can't support jRuby because it can't use forks,
and neither Rubinius which doesn't have the same kind of support for space
usage (probably a problem with forks again?).
  • Loading branch information
kouno committed Aug 3, 2012
1 parent 46935e9 commit 53d5e22
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
@@ -0,0 +1,5 @@
language: ruby
rvm:
- 1.9.3
- 1.9.2
- 1.8.7
1 change: 1 addition & 0 deletions lib/big-o.rb
@@ -1,5 +1,6 @@
require 'timeout'
require 'benchmark'
require 'bigdecimal'

require 'big-o/complexity_base'
require 'big-o/time_complexity'
Expand Down
2 changes: 1 addition & 1 deletion lib/big-o/space_complexity.rb
Expand Up @@ -65,7 +65,7 @@ def memory_measure(pid)

# @see ComplexityBase#values_to_s
def values_to_s
@result_set.values.to_s
@result_set.values.inspect
end
end
end
4 changes: 1 addition & 3 deletions lib/big-o/time_complexity.rb
@@ -1,5 +1,3 @@
require 'bigdecimal'

module BigO
# Measure time complexity.
class TimeComplexity
Expand Down Expand Up @@ -53,7 +51,7 @@ def increase_scale

# @see ComplexityBase#values_to_s
def values_to_s
@result_set.values.map(&:to_f).to_s
@result_set.values.map(&:to_f).inspect
end
end
end

0 comments on commit 53d5e22

Please sign in to comment.