FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mruby/lib/mruby/source.rb at master · phi-go/mruby · GitHub
phi-go
/
mruby
Public
forked from
mruby/mruby
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
mruby
/
lib
/
mruby
/
source.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
32 lines (24 loc) · 1.43 KB
Breadcrumbs
mruby
/
lib
/
mruby
/
source.rb
Copy path
File metadata and controls
32 lines (24 loc) · 1.43 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require
"pathname"
module
MRuby
module
Source
# mruby's source root directory
ROOT
=
Pathname
.
new
(
File
.
expand_path
(
'../../../'
,
__FILE__
)
)
# Reads a constant defined at version.h
MRUBY_READ_VERSION_CONSTANT
=
Proc
.
new
do
|
name
|
ROOT
.
join
(
'include'
,
'mruby'
,
'version.h'
)
.
read
.
match
(
/^#define
#{
name
}
+"?([
\w
\.
]+)"?
\r
?$/
)
[
1
]
end
MRUBY_RUBY_VERSION
=
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RUBY_VERSION'
]
MRUBY_RUBY_ENGINE
=
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RUBY_ENGINE'
]
MRUBY_RELEASE_MAJOR
=
Integer
(
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RELEASE_MAJOR'
]
)
MRUBY_RELEASE_MINOR
=
Integer
(
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RELEASE_MINOR'
]
)
MRUBY_RELEASE_TEENY
=
Integer
(
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RELEASE_TEENY'
]
)
MRUBY_VERSION
=
[
MRUBY_RELEASE_MAJOR
,
MRUBY_RELEASE_MINOR
,
MRUBY_RELEASE_TEENY
]
.
join
(
'.'
)
MRUBY_RELEASE_NO
=
(
MRUBY_RELEASE_MAJOR
*
100
*
100
+
MRUBY_RELEASE_MINOR
*
100
+
MRUBY_RELEASE_TEENY
)
MRUBY_RELEASE_YEAR
=
Integer
(
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RELEASE_YEAR'
]
)
MRUBY_RELEASE_MONTH
=
Integer
(
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RELEASE_MONTH'
]
)
MRUBY_RELEASE_DAY
=
Integer
(
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_RELEASE_DAY'
]
)
MRUBY_RELEASE_DATE
=
[
MRUBY_RELEASE_YEAR
,
MRUBY_RELEASE_MONTH
,
MRUBY_RELEASE_DAY
]
.
join
(
'.'
)
MRUBY_BIRTH_YEAR
=
Integer
(
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_BIRTH_YEAR'
]
)
MRUBY_AUTHOR
=
MRUBY_READ_VERSION_CONSTANT
[
'MRUBY_AUTHOR'
]
end
end
Back
|
FazBrowse Home
|
New Git URL