File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1+ Gemfile.lock
12.bundle /*
23test /tests.log
34.rvmrc
4- Gemfile.lock
5+ Gemfile.lock
Original file line number Diff line number Diff line change @@ -64,6 +64,20 @@ def callback_wrapper
6464
6565 protected
6666
67+ def _receive_protocol10_data ( data )
68+ protocol10_parser . data << data
69+
70+ messages = @protocol10_parser . process_data
71+ messages . each do |type , content |
72+ _invoke_data_callbacks ( content ) if type == :text
73+ end
74+ end
75+
76+ def _receive_protocol76_data ( data )
77+ data = data . split ( Regexp . new ( '\000([^\377]*)\377' ) ) . select { |d | !d . empty? } . collect { |d | d . gsub ( Regexp . new ( '^\x00|\xff$' ) , '' ) }
78+ data . each { |message | _invoke_data_callbacks ( message ) }
79+ end
80+
6781 def _invoke_data_callbacks ( message )
6882 self . class . on_data_callbacks . each do |callback |
6983 callback_wrapper { send ( callback , message ) }
@@ -74,10 +88,8 @@ def handle_exception(exception)
7488 handler = ExceptionHandler . new ( @env , exception )
7589
7690 # Log the exception
77- unless ENV [ 'RACK_ENV' ] == 'test'
78- exception_body = handler . dump_exception
79- Cramp . logger ? Cramp . logger . error ( exception_body ) : $stderr. puts ( exception_body )
80- end
91+ exception_body = handler . dump_exception
92+ Cramp . logger ? Cramp . logger . error ( exception_body ) : $stderr. puts ( exception_body )
8193
8294 case @_state
8395 when :init
You can’t perform that action at this time.
0 commit comments