Permalink
Browse files

ruby 1.9.1 compatibility

  • Loading branch information...
1 parent 2d4fa82 commit ee5fad80a1773f2e44ec1d284ed9839f206eba4d @invalidusrname committed Feb 10, 2010
Showing with 8 additions and 4 deletions.
  1. +1 −1 lib/jsmin.rb
  2. +7 −3 lib/synthesis/asset_package.rb
View
2 lib/jsmin.rb
@@ -41,7 +41,7 @@ def isAlphanum(c)
return false if !c || c == EOF
return ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') ||
(c >= 'A' && c <= 'Z') || c == '_' || c == '$' ||
- c == '\\' || c[0] > 126)
+ c == '\\' || c[0].ord > 126)
end
# get -- return the next character from stdin. Watch out for lookahead. If
View
10 lib/synthesis/asset_package.rb
@@ -51,9 +51,13 @@ def sources_from_targets(asset_type, targets)
source_names = Array.new
targets.each do |target|
package = find_by_target(asset_type, target)
- source_names += (package ? package.sources.collect do |src|
- package.target_dir.gsub(/^(.+)$/, '\1/') + src
- end : target.to_a)
+ if package
+ source_names += package.sources.collect do |src|
+ package.target_dir.gsub(/^(.+)$/, '\1/') + src
+ end
+ else
+ source_names += target.split(' ')
+ end
end
source_names.uniq
end

0 comments on commit ee5fad8

Please sign in to comment.