Permalink
Browse files

fix unclosed identifier bug. #119

  • Loading branch information...
1 parent 8ef9e26 commit 96fc6eb4dcb7e04f72afb1ae5d9f4cabc75081ba @javan javan committed Mar 9, 2011
Showing with 8 additions and 3 deletions.
  1. +5 −0 CHANGELOG.md
  2. +2 −2 lib/whenever/command_line.rb
  3. +1 −1 lib/whenever/version.rb
View
5 CHANGELOG.md
@@ -1,3 +1,8 @@
+### 0.6.6 / March 8th, 2011
+
+* Fix unclosed identifier bug. #119 [Javan Makhmali]
+
+
### 0.6.5 / March 8th, 2011
* Preserve whitespace at the end of crontab file. #95 [Rich Meyers]
View
4 lib/whenever/command_line.rb
@@ -89,10 +89,10 @@ def write_crontab(contents)
def updated_crontab
# Check for unopened or unclosed identifier blocks
- if read_crontab =~ Regexp.new("^#{comment_open}$") && (read_crontab =~ Regexp.new("^#{comment_close}$")).nil?
+ if read_crontab =~ Regexp.new("^#{comment_open}$") && (read_crontab =~ Regexp.new("^#{comment_close}")).nil?
warn "[fail] Unclosed indentifier; Your crontab file contains '#{comment_open}', but no '#{comment_close}'"
exit(1)
- elsif (read_crontab =~ Regexp.new("^#{comment_open}$")).nil? && read_crontab =~ Regexp.new("^#{comment_close}$")
+ elsif (read_crontab =~ Regexp.new("^#{comment_open}$")).nil? && read_crontab =~ Regexp.new("^#{comment_close}")
warn "[fail] Unopened indentifier; Your crontab file contains '#{comment_close}', but no '#{comment_open}'"
exit(1)
end
View
2 lib/whenever/version.rb
@@ -1,3 +1,3 @@
module Whenever
- VERSION = '0.6.5'
+ VERSION = '0.6.6'
end

0 comments on commit 96fc6eb

Please sign in to comment.