@@ -162,26 +162,26 @@ public IRubyObject initialize(final ThreadContext context, final IRubyObject[] a
162
162
final Ruby runtime = context .runtime ;
163
163
164
164
if (Arity .checkArgumentCount (runtime , args , 1 , 2 ) == 1 ) {
165
- sslContext = new SSLContext (runtime ).initializeImpl ();
165
+ this . sslContext = new SSLContext (runtime ).initializeImpl ();
166
166
} else {
167
167
if (!(args [1 ] instanceof SSLContext )) {
168
168
throw runtime .newTypeError (args [1 ], "OpenSSL::SSL::SSLContext" );
169
169
}
170
- sslContext = (SSLContext ) args [1 ];
170
+ this . sslContext = (SSLContext ) args [1 ];
171
171
}
172
172
173
173
if (!(args [0 ] instanceof RubyIO )) {
174
174
throw runtime .newTypeError ("IO expected but got " + args [0 ].getMetaClass ().getName ());
175
175
}
176
- setInstanceVariable ("@context" , this .sslContext ); // only compat (we do not use @context)
177
- setInstanceVariable ("@io" , this .io = (RubyIO ) args [0 ]);
176
+ setInstanceVariable ("@io" , this .io = (RubyIO ) args [0 ]); // RubyBasicSocket extends RubyIO
178
177
set_io_nonblock_checked (context , runtime .getTrue ());
179
178
// This is a bit of a hack: SSLSocket should share code with
180
179
// RubyBasicSocket, which always sets sync to true.
181
180
// Instead we set it here for now.
182
181
set_sync (context , runtime .getTrue ()); // io.sync = true
183
182
setInstanceVariable ("@sync_close" , runtime .getFalse ()); // self.sync_close = false
184
183
sslContext .setup (context );
184
+ setInstanceVariable ("@context" , sslContext ); // only compat (we do not use @context)
185
185
186
186
this .initializeTime = System .currentTimeMillis ();
187
187
0 commit comments