passenger 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (105) hide show
  1. data/NEWS +137 -0
  2. data/Rakefile +101 -19
  3. data/bin/passenger-install-nginx-module +10 -3
  4. data/bin/passenger-make-enterprisey +1 -1
  5. data/doc/Users guide Apache.html +227 -92
  6. data/doc/Users guide Apache.txt +169 -75
  7. data/doc/Users guide Nginx.html +1 -1
  8. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  9. data/doc/cxxapi/Configuration_8h-source.html +373 -338
  10. data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
  11. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  12. data/doc/cxxapi/annotated.html +1 -1
  13. data/doc/cxxapi/classHooks-members.html +1 -1
  14. data/doc/cxxapi/classHooks.html +2 -2
  15. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
  16. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
  17. data/doc/cxxapi/classes.html +1 -1
  18. data/doc/cxxapi/definitions_8h-source.html +1 -1
  19. data/doc/cxxapi/files.html +1 -1
  20. data/doc/cxxapi/functions.html +1 -1
  21. data/doc/cxxapi/functions_func.html +1 -1
  22. data/doc/cxxapi/graph_legend.html +1 -1
  23. data/doc/cxxapi/group__Configuration.html +1 -1
  24. data/doc/cxxapi/group__Core.html +1 -1
  25. data/doc/cxxapi/group__Hooks.html +1 -1
  26. data/doc/cxxapi/group__Support.html +1 -1
  27. data/doc/cxxapi/main.html +1 -1
  28. data/doc/cxxapi/modules.html +1 -1
  29. data/doc/rdoc/classes/ConditionVariable.html +59 -59
  30. data/doc/rdoc/classes/Exception.html +11 -11
  31. data/doc/rdoc/classes/GC.html +4 -4
  32. data/doc/rdoc/classes/IO.html +14 -14
  33. data/doc/rdoc/classes/PhusionPassenger.html +1 -1
  34. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +8 -8
  35. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +136 -136
  36. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +254 -254
  37. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +61 -61
  38. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +4 -4
  39. data/doc/rdoc/classes/PhusionPassenger/Application.html +14 -14
  40. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +12 -12
  41. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +4 -4
  42. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +12 -12
  43. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +5 -5
  44. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +139 -139
  45. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +61 -56
  46. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +3 -3
  47. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +7 -7
  48. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +15 -15
  49. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +119 -119
  50. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +4 -4
  51. data/doc/rdoc/classes/PhusionPassenger/Utils.html +310 -312
  52. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +169 -0
  53. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +4 -4
  54. data/doc/rdoc/classes/PlatformInfo.html +165 -164
  55. data/doc/rdoc/classes/Signal.html +23 -23
  56. data/doc/rdoc/created.rid +1 -1
  57. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
  58. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +26 -28
  59. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +26 -28
  60. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +1 -1
  61. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +1 -1
  62. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +26 -28
  63. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +1 -1
  64. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +1 -1
  65. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +26 -28
  66. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +1 -2
  67. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +1 -1
  68. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +26 -28
  69. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +26 -28
  70. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +34 -36
  71. data/doc/rdoc/fr_class_index.html +1 -0
  72. data/doc/rdoc/fr_method_index.html +72 -68
  73. data/ext/apache2/Configuration.cpp +69 -15
  74. data/ext/apache2/Configuration.h +37 -2
  75. data/ext/apache2/Hooks.cpp +167 -59
  76. data/ext/common/ApplicationPoolServerExecutable.cpp +1 -1
  77. data/ext/common/MessageChannel.h +4 -4
  78. data/ext/common/StandardApplicationPool.h +1 -1
  79. data/ext/common/Timer.h +2 -0
  80. data/ext/common/Version.h +1 -1
  81. data/ext/nginx/Configuration.c +3 -3
  82. data/ext/nginx/ContentHandler.c +16 -4
  83. data/ext/nginx/HelperServer.cpp +1 -1
  84. data/ext/oxt/system_calls.cpp +6 -1
  85. data/ext/oxt/thread.hpp +17 -2
  86. data/ext/phusion_passenger/native_support.c +4 -4
  87. data/lib/phusion_passenger/abstract_request_handler.rb +3 -3
  88. data/lib/phusion_passenger/abstract_server.rb +1 -0
  89. data/lib/phusion_passenger/constants.rb +1 -1
  90. data/lib/phusion_passenger/message_channel.rb +1 -0
  91. data/lib/phusion_passenger/platform_info.rb +3 -2
  92. data/lib/phusion_passenger/rack/request_handler.rb +11 -7
  93. data/lib/phusion_passenger/railz/application_spawner.rb +7 -4
  94. data/lib/phusion_passenger/railz/request_handler.rb +1 -0
  95. data/lib/phusion_passenger/spawn_manager.rb +1 -0
  96. data/lib/phusion_passenger/utils.rb +38 -20
  97. data/test/integration_tests/apache2_tests.rb +162 -100
  98. data/test/integration_tests/mycook_spec.rb +63 -62
  99. data/test/integration_tests/nginx_tests.rb +12 -5
  100. data/test/ruby/utils_spec.rb +98 -14
  101. data/test/stub/apache2/httpd.conf.erb +2 -1
  102. data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +8 -0
  103. data/test/support/apache2_controller.rb +5 -1
  104. data/test/support/test_helper.rb +42 -13
  105. metadata +7 -137
@@ -90,7 +90,7 @@ attribute is guaranteed non-nil.
90
90
 
91
91
  <div class="sectiontitle">Methods</div>
92
92
  <ul>
93
- <li><a href="#M000109">new</a></li>
93
+ <li><a href="#M000113">new</a></li>
94
94
  </ul>
95
95
 
96
96
 
@@ -118,11 +118,11 @@ attribute is guaranteed non-nil.
118
118
  <div class="sectiontitle">Public Class methods</div>
119
119
  <div class="method">
120
120
  <div class="title">
121
- <a name="M000109"></a><b>new</b>(message, child_exception, options)
121
+ <a name="M000113"></a><b>new</b>(message, child_exception, options)
122
122
  </div>
123
123
  <div class="sourcecode">
124
- <p class="source-link">[ <a href="javascript:toggleSource('M000109_source')" id="l_M000109_source">show source</a> ]</p>
125
- <div id="M000109_source" class="dyn-source">
124
+ <p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">show source</a> ]</p>
125
+ <div id="M000113_source" class="dyn-source">
126
126
  <pre>
127
127
  <span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 80</span>
128
128
  80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span>, <span class="ruby-identifier">options</span>)
@@ -84,9 +84,9 @@ A convenience utility class for rendering our error pages.
84
84
 
85
85
  <div class="sectiontitle">Methods</div>
86
86
  <ul>
87
- <li><a href="#M000111">[]=</a></li>
88
- <li><a href="#M000110">new</a></li>
89
- <li><a href="#M000112">result</a></li>
87
+ <li><a href="#M000115">[]=</a></li>
88
+ <li><a href="#M000114">new</a></li>
89
+ <li><a href="#M000116">result</a></li>
90
90
  </ul>
91
91
 
92
92
  <div class="sectiontitle">Included Modules</div>
@@ -114,11 +114,11 @@ A convenience utility class for rendering our error pages.
114
114
  <div class="sectiontitle">Public Class methods</div>
115
115
  <div class="method">
116
116
  <div class="title">
117
- <a name="M000110"></a><b>new</b>(template_name, options = {})
117
+ <a name="M000114"></a><b>new</b>(template_name, options = {})
118
118
  </div>
119
119
  <div class="sourcecode">
120
- <p class="source-link">[ <a href="javascript:toggleSource('M000110_source')" id="l_M000110_source">show source</a> ]</p>
121
- <div id="M000110_source" class="dyn-source">
120
+ <p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">show source</a> ]</p>
121
+ <div id="M000114_source" class="dyn-source">
122
122
  <pre>
123
123
  <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 33</span>
124
124
  33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">template_name</span>, <span class="ruby-identifier">options</span> = {})
@@ -136,11 +136,11 @@ A convenience utility class for rendering our error pages.
136
136
  <div class="sectiontitle">Public Instance methods</div>
137
137
  <div class="method">
138
138
  <div class="title">
139
- <a name="M000111"></a><b>[]=</b>(name, value)
139
+ <a name="M000115"></a><b>[]=</b>(name, value)
140
140
  </div>
141
141
  <div class="sourcecode">
142
- <p class="source-link">[ <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">show source</a> ]</p>
143
- <div id="M000111_source" class="dyn-source">
142
+ <p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">show source</a> ]</p>
143
+ <div id="M000115_source" class="dyn-source">
144
144
  <pre>
145
145
  <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 42</span>
146
146
  42: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
@@ -153,11 +153,11 @@ A convenience utility class for rendering our error pages.
153
153
  </div>
154
154
  <div class="method">
155
155
  <div class="title">
156
- <a name="M000112"></a><b>result</b>()
156
+ <a name="M000116"></a><b>result</b>()
157
157
  </div>
158
158
  <div class="sourcecode">
159
- <p class="source-link">[ <a href="javascript:toggleSource('M000112_source')" id="l_M000112_source">show source</a> ]</p>
160
- <div id="M000112_source" class="dyn-source">
159
+ <p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">show source</a> ]</p>
160
+ <div id="M000116_source" class="dyn-source">
161
161
  <pre>
162
162
  <span class="ruby-comment cmt"># File lib/phusion_passenger/html_template.rb, line 47</span>
163
163
  47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">result</span>
@@ -86,7 +86,7 @@ the failure when initializing something.
86
86
 
87
87
  <div class="sectiontitle">Methods</div>
88
88
  <ul>
89
- <li><a href="#M000096">new</a></li>
89
+ <li><a href="#M000100">new</a></li>
90
90
  </ul>
91
91
 
92
92
 
@@ -110,19 +110,19 @@ The exception that caused initialization to fail. This may be nil.
110
110
  <div class="sectiontitle">Public Class methods</div>
111
111
  <div class="method">
112
112
  <div class="title">
113
- <a name="M000096"></a><b>new</b>(message, child_exception = nil)
113
+ <a name="M000100"></a><b>new</b>(message, child_exception = nil)
114
114
  </div>
115
115
  <div class="description">
116
116
  <p>
117
- Create a <a href="InitializationError.html#M000096">new</a> <a
117
+ Create a <a href="InitializationError.html#M000100">new</a> <a
118
118
  href="InitializationError.html">InitializationError</a>. <tt>message</tt>
119
119
  is the error message, and <tt>child_exception</tt> is the exception that
120
120
  caused initialization to fail.
121
121
  </p>
122
122
  </div>
123
123
  <div class="sourcecode">
124
- <p class="source-link">[ <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">show source</a> ]</p>
125
- <div id="M000096_source" class="dyn-source">
124
+ <p class="source-link">[ <a href="javascript:toggleSource('M000100_source')" id="l_M000100_source">show source</a> ]</p>
125
+ <div id="M000100_source" class="dyn-source">
126
126
  <pre>
127
127
  <span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 48</span>
128
128
  48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span> = <span class="ruby-keyword kw">nil</span>)
@@ -134,8 +134,8 @@ The life time of a <a href="MessageChannel.html">MessageChannel</a> is
134
134
  independent from that of the wrapped <a href="../IO.html">IO</a> object. If
135
135
  a <a href="MessageChannel.html">MessageChannel</a> object is destroyed, the
136
136
  underlying <a href="../IO.html">IO</a> object is not automatically closed.
137
- Call <a href="MessageChannel.html#M000152">close</a>() if you want to <a
138
- href="MessageChannel.html#M000152">close</a> the underlying <a
137
+ Call <a href="MessageChannel.html#M000156">close</a>() if you want to <a
138
+ href="MessageChannel.html#M000156">close</a> the underlying <a
139
139
  href="../IO.html">IO</a> object.
140
140
  </p>
141
141
  <p>
@@ -154,15 +154,15 @@ things in the wrong order then bad things will happen.
154
154
 
155
155
  <div class="sectiontitle">Methods</div>
156
156
  <ul>
157
- <li><a href="#M000152">close</a></li>
158
- <li><a href="#M000151">fileno</a></li>
159
- <li><a href="#M000144">new</a></li>
160
- <li><a href="#M000145">read</a></li>
161
- <li><a href="#M000146">read_scalar</a></li>
162
- <li><a href="#M000149">recv_io</a></li>
163
- <li><a href="#M000150">send_io</a></li>
164
- <li><a href="#M000147">write</a></li>
165
- <li><a href="#M000148">write_scalar</a></li>
157
+ <li><a href="#M000156">close</a></li>
158
+ <li><a href="#M000155">fileno</a></li>
159
+ <li><a href="#M000148">new</a></li>
160
+ <li><a href="#M000149">read</a></li>
161
+ <li><a href="#M000150">read_scalar</a></li>
162
+ <li><a href="#M000153">recv_io</a></li>
163
+ <li><a href="#M000154">send_io</a></li>
164
+ <li><a href="#M000151">write</a></li>
165
+ <li><a href="#M000152">write_scalar</a></li>
166
166
  </ul>
167
167
 
168
168
 
@@ -186,23 +186,23 @@ The wrapped <a href="../IO.html">IO</a> object.
186
186
  <div class="sectiontitle">Public Class methods</div>
187
187
  <div class="method">
188
188
  <div class="title">
189
- <a name="M000144"></a><b>new</b>(io)
189
+ <a name="M000148"></a><b>new</b>(io)
190
190
  </div>
191
191
  <div class="description">
192
192
  <p>
193
- Create a <a href="MessageChannel.html#M000144">new</a> <a
193
+ Create a <a href="MessageChannel.html#M000148">new</a> <a
194
194
  href="MessageChannel.html">MessageChannel</a> by wrapping the given <a
195
195
  href="../IO.html">IO</a> object.
196
196
  </p>
197
197
  </div>
198
198
  <div class="sourcecode">
199
- <p class="source-link">[ <a href="javascript:toggleSource('M000144_source')" id="l_M000144_source">show source</a> ]</p>
200
- <div id="M000144_source" class="dyn-source">
199
+ <p class="source-link">[ <a href="javascript:toggleSource('M000148_source')" id="l_M000148_source">show source</a> ]</p>
200
+ <div id="M000148_source" class="dyn-source">
201
201
  <pre>
202
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 82</span>
203
- 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>)
204
- 83: <span class="ruby-ivar">@io</span> = <span class="ruby-identifier">io</span>
205
- 84: <span class="ruby-keyword kw">end</span>
202
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 83</span>
203
+ 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">io</span>)
204
+ 84: <span class="ruby-ivar">@io</span> = <span class="ruby-identifier">io</span>
205
+ 85: <span class="ruby-keyword kw">end</span>
206
206
  </pre>
207
207
  </div>
208
208
  </div>
@@ -210,7 +210,7 @@ href="../IO.html">IO</a> object.
210
210
  <div class="sectiontitle">Public Instance methods</div>
211
211
  <div class="method">
212
212
  <div class="title">
213
- <a name="M000152"></a><b>close</b>()
213
+ <a name="M000156"></a><b>close</b>()
214
214
  </div>
215
215
  <div class="description">
216
216
  <p>
@@ -219,20 +219,20 @@ SystemCallError or IOError when something goes wrong.
219
219
  </p>
220
220
  </div>
221
221
  <div class="sourcecode">
222
- <p class="source-link">[ <a href="javascript:toggleSource('M000152_source')" id="l_M000152_source">show source</a> ]</p>
223
- <div id="M000152_source" class="dyn-source">
222
+ <p class="source-link">[ <a href="javascript:toggleSource('M000156_source')" id="l_M000156_source">show source</a> ]</p>
223
+ <div id="M000156_source" class="dyn-source">
224
224
  <pre>
225
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 216</span>
226
- 216: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
227
- 217: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">close</span>
228
- 218: <span class="ruby-keyword kw">end</span>
225
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 217</span>
226
+ 217: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
227
+ 218: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">close</span>
228
+ 219: <span class="ruby-keyword kw">end</span>
229
229
  </pre>
230
230
  </div>
231
231
  </div>
232
232
  </div>
233
233
  <div class="method">
234
234
  <div class="title">
235
- <a name="M000151"></a><b>fileno</b>()
235
+ <a name="M000155"></a><b>fileno</b>()
236
236
  </div>
237
237
  <div class="description">
238
238
  <p>
@@ -241,20 +241,20 @@ object.
241
241
  </p>
242
242
  </div>
243
243
  <div class="sourcecode">
244
- <p class="source-link">[ <a href="javascript:toggleSource('M000151_source')" id="l_M000151_source">show source</a> ]</p>
245
- <div id="M000151_source" class="dyn-source">
244
+ <p class="source-link">[ <a href="javascript:toggleSource('M000155_source')" id="l_M000155_source">show source</a> ]</p>
245
+ <div id="M000155_source" class="dyn-source">
246
246
  <pre>
247
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 210</span>
248
- 210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileno</span>
249
- 211: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">fileno</span>
250
- 212: <span class="ruby-keyword kw">end</span>
247
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 211</span>
248
+ 211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fileno</span>
249
+ 212: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">fileno</span>
250
+ 213: <span class="ruby-keyword kw">end</span>
251
251
  </pre>
252
252
  </div>
253
253
  </div>
254
254
  </div>
255
255
  <div class="method">
256
256
  <div class="title">
257
- <a name="M000145"></a><b>read</b>()
257
+ <a name="M000149"></a><b>read</b>()
258
258
  </div>
259
259
  <div class="description">
260
260
  <p>
@@ -267,52 +267,52 @@ wrong.
267
267
  </p>
268
268
  </div>
269
269
  <div class="sourcecode">
270
- <p class="source-link">[ <a href="javascript:toggleSource('M000145_source')" id="l_M000145_source">show source</a> ]</p>
271
- <div id="M000145_source" class="dyn-source">
270
+ <p class="source-link">[ <a href="javascript:toggleSource('M000149_source')" id="l_M000149_source">show source</a> ]</p>
271
+ <div id="M000149_source" class="dyn-source">
272
272
  <pre>
273
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 92</span>
274
- 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>
275
- 93: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
276
- 94: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">HEADER_SIZE</span>
277
- 95: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">HEADER_SIZE</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
278
- 96: <span class="ruby-keyword kw">end</span>
279
- 97:
280
- 98: <span class="ruby-identifier">chunk_size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'n'</span>)[<span class="ruby-value">0</span>]
281
- 99: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
282
- 100: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">chunk_size</span>
283
- 101: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">chunk_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
284
- 102: <span class="ruby-keyword kw">end</span>
285
- 103:
286
- 104: <span class="ruby-identifier">message</span> = []
287
- 105: <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>
288
- 106: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
289
- 107: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">delimiter_pos</span>.<span class="ruby-identifier">nil?</span>
290
- 108: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
291
- 109: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&quot;</span>
292
- 110: <span class="ruby-keyword kw">else</span>
293
- 111: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">offset</span> <span class="ruby-operator">..</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
294
- 112: <span class="ruby-keyword kw">end</span>
295
- 113: <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
296
- 114: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
297
- 115: <span class="ruby-keyword kw">end</span>
298
- 116: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">message</span>
299
- 117: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
300
- 118: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
301
- 119: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
302
- 120: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
303
- 121: <span class="ruby-keyword kw">end</span>
273
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 93</span>
274
+ 93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>
275
+ 94: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
276
+ 95: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-constant">HEADER_SIZE</span>
277
+ 96: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-constant">HEADER_SIZE</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
278
+ 97: <span class="ruby-keyword kw">end</span>
279
+ 98:
280
+ 99: <span class="ruby-identifier">chunk_size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'n'</span>)[<span class="ruby-value">0</span>]
281
+ 100: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
282
+ 101: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">chunk_size</span>
283
+ 102: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">chunk_size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>)
284
+ 103: <span class="ruby-keyword kw">end</span>
285
+ 104:
286
+ 105: <span class="ruby-identifier">message</span> = []
287
+ 106: <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>
288
+ 107: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
289
+ 108: <span class="ruby-keyword kw">while</span> <span class="ruby-operator">!</span><span class="ruby-identifier">delimiter_pos</span>.<span class="ruby-identifier">nil?</span>
290
+ 109: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
291
+ 110: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;&quot;</span>
292
+ 111: <span class="ruby-keyword kw">else</span>
293
+ 112: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">buffer</span>[<span class="ruby-identifier">offset</span> <span class="ruby-operator">..</span> <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>]
294
+ 113: <span class="ruby-keyword kw">end</span>
295
+ 114: <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">delimiter_pos</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
296
+ 115: <span class="ruby-identifier">delimiter_pos</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">index</span>(<span class="ruby-constant">DELIMITER</span>, <span class="ruby-identifier">offset</span>)
297
+ 116: <span class="ruby-keyword kw">end</span>
298
+ 117: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">message</span>
299
+ 118: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
300
+ 119: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
301
+ 120: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
302
+ 121: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
303
+ 122: <span class="ruby-keyword kw">end</span>
304
304
  </pre>
305
305
  </div>
306
306
  </div>
307
307
  </div>
308
308
  <div class="method">
309
309
  <div class="title">
310
- <a name="M000146"></a><b>read_scalar</b>(max_size = nil)
310
+ <a name="M000150"></a><b>read_scalar</b>(max_size = nil)
311
311
  </div>
312
312
  <div class="description">
313
313
  <p>
314
314
  Read a scalar message from the underlying <a href="../IO.html">IO</a>
315
- object. Returns the <a href="MessageChannel.html#M000145">read</a> message,
315
+ object. Returns the <a href="MessageChannel.html#M000149">read</a> message,
316
316
  or nil on end-of-stream.
317
317
  </p>
318
318
  <p>
@@ -326,49 +326,49 @@ larger than <tt>max_size</tt>, then a SecurityError will be raised.
326
326
  </p>
327
327
  </div>
328
328
  <div class="sourcecode">
329
- <p class="source-link">[ <a href="javascript:toggleSource('M000146_source')" id="l_M000146_source">show source</a> ]</p>
330
- <div id="M000146_source" class="dyn-source">
329
+ <p class="source-link">[ <a href="javascript:toggleSource('M000150_source')" id="l_M000150_source">show source</a> ]</p>
330
+ <div id="M000150_source" class="dyn-source">
331
331
  <pre>
332
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 132</span>
333
- 132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_scalar</span>(<span class="ruby-identifier">max_size</span> = <span class="ruby-keyword kw">nil</span>)
334
- 133: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
335
- 134: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span>
336
- 135: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">4</span>
337
- 136: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">4</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
338
- 137: <span class="ruby-keyword kw">end</span>
339
- 138: <span class="ruby-identifier">size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'N'</span>)[<span class="ruby-value">0</span>]
340
- 139: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
341
- 140: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span>
342
- 141: <span class="ruby-keyword kw">else</span>
343
- 142: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">max_size</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max_size</span>
344
- 143: <span class="ruby-identifier">raise</span> <span class="ruby-constant">SecurityError</span>, <span class="ruby-node">&quot;Scalar message size (#{size}) &quot;</span> <span class="ruby-operator">&lt;&lt;</span>
345
- 144: <span class="ruby-node">&quot;exceeds maximum allowed size (#{max_size}).&quot;</span>
346
- 145: <span class="ruby-keyword kw">end</span>
347
- 146: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
348
- 147: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">size</span>
349
- 148: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span> <span class="ruby-comment cmt"># JRuby doesn't clear the buffer. TODO: remove this when JRuby has been fixed.</span>
350
- 149: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
351
- 150: <span class="ruby-keyword kw">end</span>
352
- 151: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>
353
- 152: <span class="ruby-keyword kw">end</span>
354
- 153: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
355
- 154: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
356
- 155: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
357
- 156: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
358
- 157: <span class="ruby-keyword kw">end</span>
332
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 133</span>
333
+ 133: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_scalar</span>(<span class="ruby-identifier">max_size</span> = <span class="ruby-keyword kw">nil</span>)
334
+ 134: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
335
+ 135: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span>
336
+ 136: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">4</span>
337
+ 137: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-value">4</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
338
+ 138: <span class="ruby-keyword kw">end</span>
339
+ 139: <span class="ruby-identifier">size</span> = <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">unpack</span>(<span class="ruby-value str">'N'</span>)[<span class="ruby-value">0</span>]
340
+ 140: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
341
+ 141: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span>
342
+ 142: <span class="ruby-keyword kw">else</span>
343
+ 143: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">max_size</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">max_size</span>
344
+ 144: <span class="ruby-identifier">raise</span> <span class="ruby-constant">SecurityError</span>, <span class="ruby-node">&quot;Scalar message size (#{size}) &quot;</span> <span class="ruby-operator">&lt;&lt;</span>
345
+ 145: <span class="ruby-node">&quot;exceeds maximum allowed size (#{max_size}).&quot;</span>
346
+ 146: <span class="ruby-keyword kw">end</span>
347
+ 147: <span class="ruby-identifier">buffer</span> = <span class="ruby-value str">''</span>
348
+ 148: <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">size</span>
349
+ 149: <span class="ruby-identifier">temp</span> = <span class="ruby-value str">''</span> <span class="ruby-comment cmt"># JRuby doesn't clear the buffer. TODO: remove this when JRuby has been fixed.</span>
350
+ 150: <span class="ruby-identifier">buffer</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">readpartial</span>(<span class="ruby-identifier">size</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">buffer</span>.<span class="ruby-identifier">size</span>, <span class="ruby-identifier">temp</span>)
351
+ 151: <span class="ruby-keyword kw">end</span>
352
+ 152: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">buffer</span>
353
+ 153: <span class="ruby-keyword kw">end</span>
354
+ 154: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span>
355
+ 155: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
356
+ 156: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">EOFError</span>
357
+ 157: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
358
+ 158: <span class="ruby-keyword kw">end</span>
359
359
  </pre>
360
360
  </div>
361
361
  </div>
362
362
  </div>
363
363
  <div class="method">
364
364
  <div class="title">
365
- <a name="M000149"></a><b>recv_io</b>()
365
+ <a name="M000153"></a><b>recv_io</b>()
366
366
  </div>
367
367
  <div class="description">
368
368
  <p>
369
369
  Receive an <a href="../IO.html">IO</a> object (a file descriptor) from the
370
370
  channel. The other side must have sent an <a href="../IO.html">IO</a>
371
- object by calling <a href="MessageChannel.html#M000150">send_io</a>(). Note
371
+ object by calling <a href="MessageChannel.html#M000154">send_io</a>(). Note
372
372
  that this only works on Unix sockets.
373
373
  </p>
374
374
  <p>
@@ -377,26 +377,26 @@ wrong.
377
377
  </p>
378
378
  </div>
379
379
  <div class="sourcecode">
380
- <p class="source-link">[ <a href="javascript:toggleSource('M000149_source')" id="l_M000149_source">show source</a> ]</p>
381
- <div id="M000149_source" class="dyn-source">
380
+ <p class="source-link">[ <a href="javascript:toggleSource('M000153_source')" id="l_M000153_source">show source</a> ]</p>
381
+ <div id="M000153_source" class="dyn-source">
382
382
  <pre>
383
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 195</span>
384
- 195: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recv_io</span>
385
- 196: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">recv_io</span>
386
- 197: <span class="ruby-keyword kw">end</span>
383
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 196</span>
384
+ 196: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recv_io</span>
385
+ 197: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">recv_io</span>
386
+ 198: <span class="ruby-keyword kw">end</span>
387
387
  </pre>
388
388
  </div>
389
389
  </div>
390
390
  </div>
391
391
  <div class="method">
392
392
  <div class="title">
393
- <a name="M000150"></a><b>send_io</b>(io)
393
+ <a name="M000154"></a><b>send_io</b>(io)
394
394
  </div>
395
395
  <div class="description">
396
396
  <p>
397
397
  Send an <a href="../IO.html">IO</a> object (a file descriptor) over the
398
398
  channel. The other side must receive the <a href="../IO.html">IO</a> object
399
- by calling <a href="MessageChannel.html#M000149">recv_io</a>(). Note that
399
+ by calling <a href="MessageChannel.html#M000153">recv_io</a>(). Note that
400
400
  this only works on Unix sockets.
401
401
  </p>
402
402
  <p>
@@ -405,20 +405,20 @@ wrong.
405
405
  </p>
406
406
  </div>
407
407
  <div class="sourcecode">
408
- <p class="source-link">[ <a href="javascript:toggleSource('M000150_source')" id="l_M000150_source">show source</a> ]</p>
409
- <div id="M000150_source" class="dyn-source">
408
+ <p class="source-link">[ <a href="javascript:toggleSource('M000154_source')" id="l_M000154_source">show source</a> ]</p>
409
+ <div id="M000154_source" class="dyn-source">
410
410
  <pre>
411
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 205</span>
412
- 205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
413
- 206: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
414
- 207: <span class="ruby-keyword kw">end</span>
411
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 206</span>
412
+ 206: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
413
+ 207: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">send_io</span>(<span class="ruby-identifier">io</span>)
414
+ 208: <span class="ruby-keyword kw">end</span>
415
415
  </pre>
416
416
  </div>
417
417
  </div>
418
418
  </div>
419
419
  <div class="method">
420
420
  <div class="title">
421
- <a name="M000147"></a><b>write</b>(name, *args)
421
+ <a name="M000151"></a><b>write</b>(name, *args)
422
422
  </div>
423
423
  <div class="description">
424
424
  <p>
@@ -433,30 +433,30 @@ wrong.
433
433
  </p>
434
434
  </div>
435
435
  <div class="sourcecode">
436
- <p class="source-link">[ <a href="javascript:toggleSource('M000147_source')" id="l_M000147_source">show source</a> ]</p>
437
- <div id="M000147_source" class="dyn-source">
436
+ <p class="source-link">[ <a href="javascript:toggleSource('M000151_source')" id="l_M000151_source">show source</a> ]</p>
437
+ <div id="M000151_source" class="dyn-source">
438
438
  <pre>
439
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 166</span>
440
- 166: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
441
- 167: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">name</span>)
442
- 168: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
443
- 169: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">arg</span>)
444
- 170: <span class="ruby-keyword kw">end</span>
445
- 171:
446
- 172: <span class="ruby-identifier">message</span> = <span class="ruby-node">&quot;#{name}#{DELIMITER}&quot;</span>
447
- 173: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
448
- 174: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">DELIMITER</span>
449
- 175: <span class="ruby-keyword kw">end</span>
450
- 176: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'n'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">message</span>)
451
- 177: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
452
- 178: <span class="ruby-keyword kw">end</span>
439
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 167</span>
440
+ 167: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
441
+ 168: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">name</span>)
442
+ 169: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
443
+ 170: <span class="ruby-identifier">check_argument</span>(<span class="ruby-identifier">arg</span>)
444
+ 171: <span class="ruby-keyword kw">end</span>
445
+ 172:
446
+ 173: <span class="ruby-identifier">message</span> = <span class="ruby-node">&quot;#{name}#{DELIMITER}&quot;</span>
447
+ 174: <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
448
+ 175: <span class="ruby-identifier">message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">DELIMITER</span>
449
+ 176: <span class="ruby-keyword kw">end</span>
450
+ 177: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">message</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'n'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">message</span>)
451
+ 178: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
452
+ 179: <span class="ruby-keyword kw">end</span>
453
453
  </pre>
454
454
  </div>
455
455
  </div>
456
456
  </div>
457
457
  <div class="method">
458
458
  <div class="title">
459
- <a name="M000148"></a><b>write_scalar</b>(data)
459
+ <a name="M000152"></a><b>write_scalar</b>(data)
460
460
  </div>
461
461
  <div class="description">
462
462
  <p>
@@ -469,14 +469,14 @@ wrong.
469
469
  </p>
470
470
  </div>
471
471
  <div class="sourcecode">
472
- <p class="source-link">[ <a href="javascript:toggleSource('M000148_source')" id="l_M000148_source">show source</a> ]</p>
473
- <div id="M000148_source" class="dyn-source">
472
+ <p class="source-link">[ <a href="javascript:toggleSource('M000152_source')" id="l_M000152_source">show source</a> ]</p>
473
+ <div id="M000152_source" class="dyn-source">
474
474
  <pre>
475
- <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 184</span>
476
- 184: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_scalar</span>(<span class="ruby-identifier">data</span>)
477
- 185: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">data</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'N'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">data</span>)
478
- 186: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
479
- 187: <span class="ruby-keyword kw">end</span>
475
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/message_channel.rb, line 185</span>
476
+ 185: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_scalar</span>(<span class="ruby-identifier">data</span>)
477
+ 186: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">data</span>.<span class="ruby-identifier">size</span>].<span class="ruby-identifier">pack</span>(<span class="ruby-value str">'N'</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">data</span>)
478
+ 187: <span class="ruby-ivar">@io</span>.<span class="ruby-identifier">flush</span>
479
+ 188: <span class="ruby-keyword kw">end</span>
480
480
  </pre>
481
481
  </div>
482
482
  </div>