File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 6
6
# GNU General Public License version 2, or
7
7
# GNU Lesser General Public License version 2.1.
8
8
9
+ require 'rbconfig'
10
+
9
11
def glob ( pattern )
10
12
files = Dir . glob ( pattern )
11
13
raise "no libraries found with #{ pattern } " if files . empty?
12
14
files
13
15
end
14
16
15
- stdlibs = glob ( 'lib/mri/*.{rb,su}' ) . map { |file |
16
- File . basename ( file , '.*' )
17
+ stdlibs = [ ]
18
+
19
+ glob ( "#{ RbConfig ::CONFIG [ 'rubylibdir' ] } /*.rb" ) . each { |file |
20
+ stdlibs << File . basename ( file , '.*' )
21
+ }
22
+
23
+ glob ( "#{ RbConfig ::CONFIG [ 'archdir' ] } /*.su" ) . each { |file |
24
+ stdlibs << File . basename ( file , '.*' )
17
25
}
18
26
19
- glob ( ' lib/truffle/*.rb' ) . map { |file |
27
+ glob ( " #{ RbConfig :: CONFIG [ 'prefix' ] } / lib/truffle/*.rb" ) . each { |file |
20
28
stdlibs << File . basename ( file , '.*' )
21
29
}
22
30
23
- glob ( 'lib/mri/ net/*.rb' ) . map { | file | File . basename ( file , '.*' ) } . each { |file |
24
- stdlibs << "net/#{ file } "
31
+ glob ( " #{ RbConfig :: CONFIG [ 'rubylibdir' ] } / net/*.rb" ) . each { |file |
32
+ stdlibs << "net/#{ File . basename ( file , '.*' ) } "
25
33
}
26
34
27
35
stdlibs += %w[ json ]
You can’t perform that action at this time.
0 commit comments