Skip to content

Commit

Permalink
Fix ruby1.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mynyml committed Nov 25, 2009
1 parent df4d652 commit 5ea632d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions Rakefile
Expand Up @@ -15,12 +15,11 @@ namespace(:test) do

desc "Run all tests on multiple ruby versions (requires rvm)"
task(:portability) do
versions = %w( 1.8.6 1.8.7 )
versions.each do |version|
%w( 1.8.6 1.8.7 1.9.1 1.9.2 ).each do |version|
system <<-BASH
bash -c 'source ~/.rvm/scripts/rvm;
rvm use #{version};
echo "--------- `ruby -v` ----------\n";
rvm #{version};
echo "--------- v#{version} ----------\n";
rake -s test:all'
BASH
end
Expand Down
4 changes: 2 additions & 2 deletions lib/watchr/script.rb
Expand Up @@ -77,7 +77,7 @@ def reload
def initialize(path = nil)
@path = path
@rules = []
@default_action = lambda {}
@default_action = Proc.new {}
@ec = EvalContext.new(self)
end

Expand Down Expand Up @@ -159,7 +159,7 @@ def default_action(&action)
# Reset script state
def reset
@rules = []
@default_action = lambda {}
@default_action = Proc.new {}
end

# Eval content of script file.
Expand Down

0 comments on commit 5ea632d

Please sign in to comment.