Skip to content

Commit

Permalink
JRuby doesn't return an Enumerator for gsub with no args, so get arou…
Browse files Browse the repository at this point in the history
…nd it - also JRuby doesn't like bluecloth
  • Loading branch information
Mark Evans committed Apr 11, 2011
1 parent 06fe7c1 commit f801b65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -4,7 +4,6 @@ gem "rack"

# These gems are needed for development and testing
group :development, :test, :cucumber do
gem 'bluecloth'
gem 'capybara'
gem 'cucumber', '~>0.10.0'
gem 'cucumber-rails', '~>0.3.2'
Expand All @@ -24,6 +23,7 @@ group :development, :test, :cucumber do
gem "activerecord-jdbcsqlite3-adapter"
gem "jruby-openssl"
else
gem 'bluecloth'
gem 'bson_ext'
gem 'sqlite3-ruby'
end
Expand Down
4 changes: 3 additions & 1 deletion lib/dragonfly/url_mapper.rb
Expand Up @@ -66,7 +66,9 @@ def init_segments(patterns)
end

def init_url_regexp
regexp_string = url_format.gsub(/[^\w_]:([\w_]+)/).with_index do |_, i|
i = -1
regexp_string = url_format.gsub(/[^\w_]:[\w_]+/) do
i += 1
segments[i].regexp_string
end
@url_regexp = Regexp.new('^' + regexp_string + '$')
Expand Down

0 comments on commit f801b65

Please sign in to comment.