Permalink
Browse files

Add 'lib' path to top of $: to prevent to load unintentionally anothe…

…r file with same filename in 1.9.2

Signed-off-by: Shin-ichiro OGAWA <rust.stnard+git@gmail.com>
  • Loading branch information...
1 parent 9e3aa66 commit 861d6e1dfb64dcc209b22244e2be0787207639a7 @rust rust committed Aug 10, 2010
Showing with 4 additions and 1 deletion.
  1. +1 −1 init.rb
  2. +3 −0 lib/jpmobile.rb
View
2 init.rb
@@ -1,3 +1,3 @@
# Include hook code here
-require 'jpmobile'
+require File.join(File.dirname(__FILE__), 'lib/jpmobile')
View
3 lib/jpmobile.rb
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
+$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
+ $:.include?(File.expand_path(File.dirname(__FILE__)))
+
module Jpmobile
autoload :Email, 'jpmobile/email'
autoload :Emoticon, 'jpmobile/emoticon'

0 comments on commit 861d6e1

Please sign in to comment.