lib/erlectricity.rb in erlectricity-0.2.0 vs lib/erlectricity.rb in erlectricity-0.2.1
- old
+ new
@@ -1,17 +1,21 @@
+$:.unshift File.join(File.dirname(__FILE__), *%w[.. ext])
+
+
require 'erlectricity/constants'
require 'erlectricity/types/new_reference'
require 'erlectricity/types/pid'
require 'erlectricity/types/function'
require 'erlectricity/types/list'
+
begin
#try to load the decoder C extension
require 'decoder'
rescue LoadError
#load the pure ruby instead
- require 'erlectricity/decoder'
+ require 'erlectricity/decoder'
end
require 'erlectricity/encoder'
require 'erlectricity/port'
\ No newline at end of file