Malizia R
1c7572bc6a
Update mirb.c
2016-07-27 16:51:10 -03:00
Yukihiro "Matz" Matsumoto
f7afe1d82a
change mrb_run related API names; compatibility macros provided
2016-01-07 22:36:29 +09:00
Yukihiro "Matz" Matsumoto
879e27d0f1
mirb: enlarge code buffer size to 4KB
2016-01-02 16:58:42 +09:00
Yukihiro "Matz" Matsumoto
825ced12de
remove duplicated local variable declaration
2015-12-26 11:23:28 +09:00
kyab
1e34b12a02
mirb: Don't exit on Ctrl-C
2015-12-26 10:03:28 +09:00
Yukihiro "Matz" Matsumoto
85bd99757c
avoid comparison between signed and unsigned
2015-12-01 10:18:01 +09:00
Yukihiro "Matz" Matsumoto
9a41db6f3a
Merge pull request #2950 from mattn/mirb-file-args
...
mirb should take filename and arguments.
2015-11-27 17:49:35 +09:00
Yukihiro "Matz" Matsumoto
5c405dea3d
include changed from by quotes ("") to by brackets (<>); close #3032
2015-11-27 17:48:23 +09:00
Yasuhiro Matsumoto
e20c2d78d1
mirb should take filename and arguments.
2015-09-12 13:23:22 +09:00
Yasuhiro Matsumoto
8277e950ee
Support windows locale
...
Add mrb_utf8_from_locale, mrb_utf8_free, mrb_locale_from_utf8, mrb_locale_free. Just works for windows.
2015-09-11 11:12:03 +09:00
Yukihiro "Matz" Matsumoto
d764632f86
Merge pull request #2680 from sdottaka/add-fflush
...
mrdb, mirb: Add fflush() so that a external program can read output imme...
2015-01-19 08:30:52 +09:00
Tatsuhiko Kubo
dae42ffe54
Removed duplicated declarations.
...
* `mrb_show_version()`
* `mrb_show_copyright()`
2015-01-03 22:56:36 +09:00
sdottaka
9a0fb6f91b
mrdb, mirb: Add fflush() so that a external program can read output immediately.
2014-12-19 16:09:55 +09:00
Yukihiro "Matz" Matsumoto
9723d6e4ba
mirb dies if #inspect returns a non-string value; fix #2666
2014-12-12 13:14:56 +09:00
Tatsuhiko Kubo
6c7ba826dd
Use sizeof() instead of strlen().
2014-08-22 20:37:34 +09:00
Tatsuhiko Kubo
55ee7fe79c
Fix error handlings in mirb.
...
mrb_parser_new() and mrb_generate_code() may return NULL.
2014-08-19 16:04:48 +09:00
cremno
82a335643e
call mrb_malloc_simple instead of malloc
2014-07-12 11:50:51 +02:00
cremno
9d597f4d9f
allocate history_path dynamically
...
`PATH_MAX` doesn't have to be defined and if it is, then its value is
usually incorrect (possible buffer overflow).
Use `malloc` and `snprintf` instead to prevent this.
https://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html
2014-07-11 13:03:13 +02:00
take_cheeze
a656daf4c5
Use TRUE instead of 1 in mirb code.
2014-06-30 23:26:23 +09:00
Kouhei Sutou
4f3114dbc9
Add a missing space after ","
2014-06-09 23:00:02 +09:00
cremno
71c7d58736
partially revert 1a5841b for mirb
...
Fix compilation fail caused by GNU Readline and `ISPRINT`.
Also add missing `unsigned char` cast.
2014-06-06 00:13:24 +02:00
cremno
1a5841b4b1
use uppercase US-ASCII ctype macros
2014-06-05 21:00:47 +02:00
Yukihiro "Matz" Matsumoto
0651051ded
allow quit/exit to work within mirb; fix #2253 close #2254
...
also allow spaces around quit/exit.
2014-05-15 12:07:02 +09:00
Yukihiro "Matz" Matsumoto
0265b47833
remove unnecessary semicolons from a38f8f
2014-05-13 20:17:54 +09:00
Yukihiro "Matz" Matsumoto
a38f8fe606
support comments in user-input; also add checks for buffer overflow
2014-05-13 16:03:41 +09:00
take_cheeze
cf5155f8f7
Suppress warning when using readline in mirb.
2014-05-03 21:24:03 +09:00
take_cheeze
052fe51279
Use header searcher to find readline and linenoise.
2014-05-01 16:49:55 +09:00
Nobuyoshi Nakada
ab67c57f65
remove trailing spaces
2014-04-30 09:50:14 +09:00
takkaw
0d4bd01cf1
support linenoise in mirb
2014-03-08 01:22:31 +09:00
takkaw
d7d8b09580
small refactor
2014-03-05 23:35:34 +09:00
kyab
1cf619d3b4
Fix unused function warning when readline enabled (mirb)
2014-02-23 20:43:43 +09:00
Li Yazhou
9ebfeac111
keep stack with nlocals instead of nregs; fix #1706
2014-02-14 11:16:56 +08:00
Yukihiro "Matz" Matsumoto
19a08b8455
Merge pull request #1674 from cremno/mrb_bool-FALSE-TRUE
...
use mrb_bool, FALSE and TRUE more
2014-02-09 18:35:20 +09:00
Daniel Bovensiepen
5056a29d93
Remove notice of early version
2014-02-08 03:06:05 +08:00
cremno
4507985c3e
use mrb_bool, FALSE and TRUE more
...
It doesn't matter to me if one is using FALSE/TRUE instead of 1/0
but I prefer a type (alias) which emphasizes boolean vars to int.
I changed 1/0 to FALSE/TRUE anyway.
2014-01-31 18:00:36 +01:00
cremno
f2a62a74ed
clean up external symbols
...
remove unused and unneeded:
- sysexit_status
- type (a global variable)
add mrb_ prefix to:
- codedump_all
- class_instance_method_list
- parser_dump
make various functions static, incl.:
- yyparse
- make_exception
2014-01-31 01:30:18 +01:00
cremno
aa655b9ee1
remove superfluous includes
...
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
take_cheeze
df780ae5e9
add mrb_intern_lit for creating symbol from string literal
2013-12-01 10:38:59 +09:00
Yukihiro "Matz" Matsumoto
9c6398a444
rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513
2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto
a725bd7a23
call codedump_all() from mirb if --verbose is set; close #1559
2013-11-10 04:34:53 +09:00
Yukihiro "Matz" Matsumoto
f80401de6c
resolved conflicts and updated to latest return value change of mrb_generate_code()
2013-11-05 00:13:01 +09:00
fleuria
82c5b486e0
mirb: reset stack in the first command
2013-11-03 12:05:48 +08:00
fleuria
a511957ec8
refactor mrb_context_run()
2013-11-03 12:05:25 +08:00
fleuria
d75a907edf
introduce mrb_context_run()
...
currently there are two scnenario to call mrb_run(), the first is
calling a proc, in this case mrb should create a new environment,
discarding all the variables except args, reciever and block.
the second is calling the newly generated irep, like in mirb.
in this case, the variables should be kept after mrb_run().
so we introduce mrb_context_run() to handle this seperately.
2013-11-03 11:32:59 +08:00
Yukihiro "Matz" Matsumoto
0be572df62
change return value from mrb_generate_code()
2013-11-02 23:20:04 +09:00
Lukas Stabe
5692b5ade1
fix no multiline strings in mirb
2013-10-04 06:03:53 +02:00
Jack Danger Canty
2bf4952284
Adding line numbers to the output of mirb.
...
Before:
> "hi"
hi
> d
(mirb):1: undefined method 'd' for main (NoMethodError)
> d
(mirb):1: undefined method 'd' for main (NoMethodError)
> "hi"
hi
> "#{'}"
line 1: unterminated string meets end of file
After
> "hi"
hi
> d
(mirb):2: undefined method 'd' for main (NoMethodError)
> d
(mirb):3: undefined method 'd' for main (NoMethodError)
> "hi"
hi
> "#{'}"
line 5: unterminated string meets end of file
2013-08-13 09:53:52 -07:00
Carson McDonald
d2e38eab0a
Set filename like irb
2013-08-03 14:42:22 -04:00
Yukihiro "Matz" Matsumoto
0591413ebd
Merge pull request #1402 from mattn/check_home_is_null
...
Check home is null
2013-07-23 05:45:33 -07:00
mattn
c8f1f7fdf6
Check home is null
2013-07-23 12:13:50 +09:00