Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Commit

Permalink
More generic call to environment Ruby.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedrosa committed Nov 16, 2011
1 parent 6731c1c commit fd1c36c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luhny.rb
@@ -1,9 +1,9 @@
#!/usr/local/bin/ruby
#!/usr/bin/env ruby

def test_it s
a = a.is_a?(String) ? s.scan(/\d/) : s
a = a.map{|ns| ns.to_i }
i = a.length - 2;
i = a.length - 2
n = 0
while i >= 0 do
n = a[i] * 2
Expand Down

0 comments on commit fd1c36c

Please sign in to comment.