Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
600e3330
Unverified
Commit
600e3330
authored
Nov 14, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scan source files only from `cdump` enabled gems.
parent
4dcd8dd7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
Rakefile
Rakefile
+10
-12
lib/mruby/gem.rb
lib/mruby/gem.rb
+4
-0
mrblib/enum.rb
mrblib/enum.rb
+1
-1
No files found.
Rakefile
View file @
600e3330
...
...
@@ -60,6 +60,9 @@ else
depfiles
=
[]
end
cfiles
=
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/src/*.c"
)
rbfiles
=
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/mrblib/**/*.rb"
)
psfiles
=
[]
MRuby
.
each_target
do
|
target
|
gems
.
map
do
|
gem
|
current_dir
=
gem
.
dir
.
relative_path_from
(
Dir
.
pwd
)
...
...
@@ -94,21 +97,16 @@ MRuby.each_target do |target|
depfiles
+=
[
exec
]
end
end
if
gem
.
cdump?
cfiles
+=
Dir
.
glob
(
relative_from_root
+
"/{src,core}/*.c"
)
rbfiles
+=
Dir
.
glob
(
relative_from_root
+
"/mrblib/**/*.rb"
)
psfiles
+=
Dir
.
glob
(
relative_from_root
+
"/**/presym"
)
end
end
end
mkdir_p
"
#{
MRUBY_ROOT
}
/build"
cfiles
=
(
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/src/*.c"
)
+
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/mrbgems/**/*.c"
)
+
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/build/repos/**/{src,core}/*.c"
)
).
uniq
rbfiles
=
(
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/mrblib/**/*.rb"
)
+
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/mrbgems/*/mrblib/**/*.rb"
).
grep_v
(
/mruby-test/
)
+
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/build/repos/**/mrblib/**/*.rb"
)
).
uniq
psfiles
=
Dir
.
glob
(
"
#{
MRUBY_ROOT
}
/{mrblib,mrbgems,build/repos}/**/presym"
)
symbols
=
[]
psfiles
.
each
do
|
file
|
symbols
+=
File
.
readlines
(
file
).
grep_v
(
/^# /
)
...
...
@@ -197,7 +195,7 @@ file presym_file => cfiles+rbfiles+psfiles+[__FILE__] do
src
.
scan
(
/[ \(\[\{]:'([^']+)'/
)
]
end
symbols
=
(
symbols
+
csymbols
+
rbsymbols
+
op_table
.
keys
).
flatten
.
compact
.
uniq
.
sort
.
map
{
|
x
|
x
.
gsub
(
"
\n
"
,
'\n'
)}
symbols
=
(
symbols
+
csymbols
+
rbsymbols
+
op_table
.
keys
).
flatten
.
compact
.
uniq
.
sort
.
grep_v
(
/#/
).
map
{
|
x
|
x
.
gsub
(
"
\n
"
,
'\n'
)}
presyms
=
File
.
readlines
(
presym_file
)
rescue
[]
presyms
.
each
{
|
x
|
x
.
chomp!
}
if
presyms
!=
symbols
...
...
lib/mruby/gem.rb
View file @
600e3330
...
...
@@ -123,6 +123,10 @@ module MRuby
@cdump
=
true
end
def
cdump?
@cdump
end
def
add_dependency
(
name
,
*
requirements
)
default_gem
=
requirements
.
last
.
kind_of?
(
Hash
)
?
requirements
.
pop
:
nil
requirements
=
[
'>= 0.0.0'
]
if
requirements
.
empty?
...
...
mrblib/enum.rb
View file @
600e3330
...
...
@@ -10,7 +10,7 @@
# implement a meaningful `<=>` operator, as these methods
# rely on an ordering between members of the collection.
#
#
@
ISO 15.3.2
# ISO 15.3.2
module
Enumerable
NONE
=
Object
.
new
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment