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
b5946822
Commit
b5946822
authored
Nov 10, 2019
by
KOBAYASHI Shuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Defer getting `caller_dir` until needed in `MRuby::LoadGems#gem`
parent
cc54257d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
lib/mruby/build/load_gems.rb
lib/mruby/build/load_gems.rb
+1
-2
No files found.
lib/mruby/build/load_gems.rb
View file @
b5946822
...
...
@@ -13,13 +13,12 @@ module MRuby
end
def
gem
(
gemdir
,
&
block
)
caller_dir
=
File
.
expand_path
(
File
.
dirname
(
/^(.*?):\d/
.
match
(
caller
.
first
).
to_a
[
1
]))
if
gemdir
.
is_a?
(
Hash
)
gemdir
=
load_special_path_gem
(
gemdir
)
elsif
GemBox
.
path
&&
gemdir
.
is_a?
(
String
)
gemdir
=
File
.
expand_path
(
gemdir
,
File
.
dirname
(
GemBox
.
path
))
else
caller_dir
=
File
.
expand_path
(
File
.
dirname
(
caller
(
1
,
1
)[
0
][
/^(.*?):\d/
,
1
]))
gemdir
=
File
.
expand_path
(
gemdir
,
caller_dir
)
end
...
...
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