File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,18 @@ public void testRequireCextNotAllowedWhenCextIsDisabledGlobally() throws Excepti
122
122
RubyInstanceConfig cfg = new RubyInstanceConfig ();
123
123
cfg .setCextEnabled (false );
124
124
runtime = Ruby .newInstance (cfg );
125
+
126
+ String extensionSuffix ;
127
+ if (Platform .IS_WINDOWS ) {
128
+ extensionSuffix = ".dll" ;
129
+ } else if (Platform .IS_MAC ) { // TODO: BSD also?
130
+ extensionSuffix = ".bundle" ;
131
+ } else {
132
+ extensionSuffix = ".so" ;
133
+ }
134
+
125
135
try {
126
- runtime .evalScriptlet ("require 'tempfile'; file = Tempfile.open(['foo', '.so ']); file.close; require file.path" );
136
+ runtime .evalScriptlet ("require 'tempfile'; file = Tempfile.open(['foo', '" + extensionSuffix + " ']); file.close; require file.path" );
127
137
fail ();
128
138
} catch (RaiseException re ) {
129
139
assertTrue (re .getException ().message .asJavaString ().startsWith (
You can’t perform that action at this time.
0 commit comments