Skip to content
This repository
Browse code

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...
commit 861d6e1dfb64dcc209b22244e2be0787207639a7 1 parent 9e3aa66
Rust/OGAWA rust authored

Showing 2 changed files with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  init.rb
  2. +3 0  lib/jpmobile.rb
2  init.rb
... ... @@ -1,3 +1,3 @@
1 1 # Include hook code here
2 2
3   -require 'jpmobile'
  3 +require File.join(File.dirname(__FILE__), 'lib/jpmobile')
3  lib/jpmobile.rb
... ... @@ -1,4 +1,7 @@
1 1 # -*- coding: utf-8 -*-
  2 +$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
  3 + $:.include?(File.expand_path(File.dirname(__FILE__)))
  4 +
2 5 module Jpmobile
3 6 autoload :Email, 'jpmobile/email'
4 7 autoload :Emoticon, 'jpmobile/emoticon'

0 comments on commit 861d6e1

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