Skip to content
Browse files

Merge pull request #61 from jkamenik/master

Fixed Rails Example
  • Loading branch information...
2 parents dcfcd48 + ce2d6c8 commit 422b3f6812f1cc5c0b1098fcf818f03982ea05eb @kastner kastner committed Feb 16, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 examples/ruby_example2.rb
View
5 examples/ruby_example2.rb
@@ -74,11 +74,10 @@ def self.send(data, sample_rate=1)
end
end
- @@config = {}
def self.config
- return @@config if @@config
+ return @@config if self.class_variable_defined?(:@@config)
begin
- config_path = File.join(File.dir(__FILE__), "statsd.yml")
+ config_path = File.join(File.dirname(__FILE__), "statsd.yml")
# for Rails environments, check Rails.root/config/statsd.yml
if defined? Rails
config_path = File.join(Rails.root, "config", "statsd.yml")

0 comments on commit 422b3f6

Please sign in to comment.
Something went wrong with that request. Please try again.