lib/ionian/extension/io.rb in ionian-0.6.2 vs lib/ionian/extension/io.rb in ionian-0.6.3

- old
+ new

@@ -19,11 +19,11 @@ # Initialize the Ionian instance variables. # This is called automatically if #extend is called on an object. def initialize_ionian @ionian_listeners = [] @ionian_buf = '' - @ionian_expression = /(.*?)\r?\n?/ + @ionian_expression = /(.*?)[\r\n]+/ @ionian_timeout = nil @ionian_skip_select = false @ionian_build_methods = true end @@ -120,11 +120,11 @@ unless match.respond_to? symbol } end end - # Notify on_match listeners. - @matches.each {|match| notify_listeners match} if notify + # Notify on_match listeners unless the #run_match thread is active. + @matches.each {|match| notify_listeners match} if notify and not @match_listener @matches end # Start a thread that checks for data and notifies listeners (do |match, socket|). \ No newline at end of file