Skip to content

Commit

Permalink
sorting filenames for require loops to prevent dependency problems wi…
Browse files Browse the repository at this point in the history
…th loading order

Signed-off-by: Sven Fuchs <svenfuchs@artweb-design.de>
  • Loading branch information
Jan Friedrich authored and Sven Fuchs committed Aug 22, 2009
1 parent 303d7ac commit 6190e1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/ripper/ruby_builder.rb
Expand Up @@ -9,7 +9,7 @@

require 'erb/stripper'

Dir[File.dirname(__FILE__) + '/ruby_builder/events/*.rb'].each { |file| require file }
Dir[File.dirname(__FILE__) + '/ruby_builder/events/*.rb'].sort.each { |file| require file }

# Ripper::RubyBuilder extends Ripper's SexpBuilder and builds a rich, object
# oriented representation of Ruby code.
Expand Down Expand Up @@ -176,4 +176,4 @@ def build_xstring(token)
end
end
end
end
end
4 changes: 2 additions & 2 deletions lib/ruby.rb
@@ -1,4 +1,4 @@
Dir[File.dirname(__FILE__) + '/ruby/*.rb'].each do |file|
Dir[File.dirname(__FILE__) + '/ruby/*.rb'].sort.each do |file|
require "ruby/#{File.basename(file)}"
end

Expand All @@ -25,4 +25,4 @@

module Ruby
include Conversions
end
end

1 comment on commit 6190e1e

@laserlemon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into the same issue that this commit fixes. Can we release a new gem version?

Please sign in to comment.