* lib/irb.rb (eval_input): restore the last error `$!`, as the
previous result. [Feature #14684]
* lib/irb/context.rb (evaluate): add `exception` keyword argument
to set the last error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
And thus avoiding Module#name calls. Those are slow, especially in
larger projects, with lots of anonymous modules.
[Fix GH-1798]
From: Dmitry Gutov <dgutov@yandex.ru>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
If uplevel keyword is given, the warning message is prepended
with caller file and line information and the string "warning: ".
The use of the uplevel keyword makes Kernel#warn format output
similar to how rb_warn formats output.
This patch modifies net/ftp and net/imap to use Kernel#warn
instead of $stderr.puts or $stderr.printf, since they are used
for printing warnings.
This makes lib/cgi/core and tempfile use $stderr.puts instead of
warn for debug logging, since they are used for debug printing
and not for warning.
This does not modify bundler, rubygems, or rdoc, as those are
maintained outside of ruby and probably wish to remain backwards
compatible with older ruby versions.
rb_warn_m code is originally from nobu, but I've changed it
so that it only includes the path and lineno from uplevel
(not the method), and also prepends the string "warning: ",
to make it more similar to rb_warn.
From: Jeremy Evans code@jeremyevans.net
Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is not perfectly good solution (at least we don't want to have ARGV
as default value of `argv` argument), but unfortunately IRB.setup and
IRB.parse_opts are public methods and we can't make breaking change to
those methods.
We may deprecate using them and then make them private in the future,
but the removal should not be in Ruby 2.5. So I kept their interface for
now.
[Bug #14162] [close GH-1770]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/workspace.rb (code_around_binding): `SCRIPT_LINES__`
values are arrays of lines. get file and line at once. moved
loop-invariant format string. join without extra strings by
`$,`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
There actually are some libraries that requires 'irb' such as byebug, and when
'irb' is required, it requires irb/src_encoding.rb, then it defines the toplevel
default_src_encoding method that is visible from anywhere in the end users' apps.
Here's a quick oneliner that shows what's happening.
% ruby -rpry-byebug -e 'p private_methods(false)'
[:include, :using, :define_method, :public, :private, :DelegateClass, :default_src_encoding]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued
line; empty lines, a semicolon, first line in `begin` block,
just after `else` are not continued.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/slex.rb (postproc): translated a japanese comment in
ISO-2022-JP. [ruby-core:79017] [Misc #13117]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/ruby-lex.rb (identify_identifier): treat identifier just
followed by a colon as a lable. this is not a precise solution
but enough for the time being. [ruby-core:78526] [Bug #13012]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
auto-indentation and autocompletion using irbrc and irb_context
[ruby-core:51209] [Bug #7642] and [ruby-core:51348] [Bug #7680]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
history file that already exists [Bug #7694]. Thanks Nobuhiro IMAI
for this patch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
owner-only-readable file and change the permission of a file that
already exists [Bug #7694]. Thanks Nobuhiro IMAI for bug reports.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
class methods to IRB::Inspector [ruby-core:51067][Bug #7598]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the file to read, to the internal encoding.
[Bug #4281][ruby-dev:43036]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Gem might be undefined if --disable-gems. [ruby-core:34990]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
some platoform has a locale without territory but with
encoding.
(#each_sub_locale): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to load a localization from a gem.
(IRB::Locale#lc_path): obsoleted because of the change of #search_file
(IRB::Locale#each_localized_path): new private method, based on lc_path
(IRB::Locale#find): follows the change of #search_file.
(IRB::Locale#load): removed duplicate with #find.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
regex options. a patch from Heesob Park in [ruby-core:32988].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
switch called in irb. a patch from Andrew Grimm in
[ruby-core:31558].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
regression for handling case when there is no newline at the end of
file. [ruby-core:28248]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
long variable name at copletion. [Bug#1969]. refix [ruby-core:28366].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
object without #inspect defined. a patch from Daniel
Bovensiepen. [ruby-core:25200]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
IRB::irb_at_exit. no use finalizer saving history. [ruby-dev-38563]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
overloadable negative operators.
* lib/irb/ruby-lex.rb (RubyLex#lex_init): Support overloadable
negative operators.
* lib/irb/ruby-lex.rb (RubyLex#identify_identifier): Minus signs
need to be escaped in regexp character class.
* misc/ruby-mode.el (ruby-font-lock-keywords, ruby-parse-partial):
Support overloadable negative operators.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
line options. [ruby-dev:37161]. Fixes#711.
improved long optinos.
* lib/irb/init.rb (IRB.set_encoding): new subroutine for IRB.opt_parse
* lib/irb/input-method.rb (IRB::StdioInputMethod): (M17N) regards
scripts that user types as encoded in the external_encoding.
* lib/irb/input-method.rb (IRB::ReadlineInputMethod): ditto.
* lib/irb/input-method.rb (IRB::FileInputMethod): (M17N) respects
magic comment.
* lib/irb/help.rb (IRB.print_usage): (M17N) respects magic comment
in the resource file.
* lib/irb/lc/help-message: adds -U and -E.
* lib/irb/lc/ja/help-message: ditto. re-encoded from ISO-2022-JP into UTF-8.
* lib/irb/lc/ja/encoding_aliases.rb: new file. provides Japanese specific
character encoding name table for backward compatibility.
* lib/irb/lc/ja/error.rb: re-eoncoded from ISO-2022-JP into UTF-8.
magic comment.
* lib/irb/locale.rb: integrated with Ruby 1.9's M17N support.
* lib/irb/magic-file.rb: new file. utility to handle files with magic
comment and opens in the correct encoding.
* lib/irb/ruby-lex.rb (RubyLex#each_top_level_statement): recovers
character encoding for a statement after it lexed so that irb can
eval the statement in correct encoding.
* lib/irb/src_encoding.rb: new file. utility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
a patch from Daniel Berger <Daniel.Berger at qwest.com> in
[ruby-core:19451]. fix [ruby-core:19450]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/irb/context.rb: convert string Symbol of instance variable names in IRB:Context#inspect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-core:15825]
* lib/rdoc/ri/driver.rb (RDoc::initialize): allow options to be optional.
* lib/rdoc/ri/driver.rb (RDoc::class_cache): map_dirs may be
empty.
* lib/rdoc/ri/driver.rb (RDoc::get_info_for): revive get_info_for
method. maybe broken.
* lib/rdoc/ri/util.rb (RDoc::initialize): should not use RiError
no more.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
considered as IRB bug. [ruby-dev:33991]
* lib/irb/workspace.rb (IRB::WorkSpace::filter_backtrace): should
filter 'irb.rb' as well for context mode 2 and 3.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
change "illegal" to "invalid" in a context which doesn' t against
a law.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/completion.rb: support Ruby1.9 changing return value
String to Symbol for Object#methods, etc. [ruby-dev:31148].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
RDoc. a patch from Eric Hodel <drbrain at segment7.net>.
[ruby-core:08522]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
as Array.
* lib/irb/slex.rb: use Proc#yield.
* lib/rdoc/markup/simple_markup/inline.rb: follow the new behavior
of String#[].
* lib/rdoc/ri/ri_write.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
message. a patch from Mauricio Fernandez <mfp at acm.org>
[ruby-core:07340]
* eval.c (rb_f_autoload): check if ruby_cbase is nil (during
instance_eval for objects cannot have singleton classes,
e.g. fixnums and symbols). [ruby-dev:28178]
* gc.c (rb_gc_call_finalizer_at_exit): turn on during_gc while
invoking finalizers.
* gc.c (rb_gc_finalize_deferred): ditto.
* io.c (rb_write_error2): use fwrite(3) if rb_stderr is not
updated or is already freed. [ruby-dev:28313]
* eval.c (error_line): include the class name of a surrounding
method in error position description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:26872]
* lib/irb/locale.rb: support to print help message when OS locale is
ja_JP.utf-8. [ruby-dev:26872]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-dev:26872]
* lib/irb/locale.rb: support to print help message when OS locale is
ja_JP.utf-8. [ruby-dev:26872]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for [ruby-dev:26410]. And support a numeric form of 0d99999.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/readline/readline.c (readline_s_set_input): new method.
* ext/readline/readline.c (readline_s_set_output): new method.
* lib/irb/input-method.rb: set Readline.input and Readline.output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/readline/extconf.rb: added new option --enable-libedit.
* test/readline/test_readline.rb: added assertions for
Readline::HISTORY.
* lib/irb/input-method.rb: do not use Readline::HISTORY.pop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/ext/loader.rb, lib/irb/ext/save-history.rb:
fix location of @RCS_ID
* lib/irb/cmd/help.rb: a lost of release IRB 0.9.5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_exec_recursive() in eval.c.
* eval.c (rb_exec_recursive): new function.
* array.c (rb_ary_join): use rb_exec_recursive().
* array.c (rb_ary_inspect, rb_ary_hash): ditto.
* file.c (rb_file_join): ditto.
* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.
* io.c (rb_io_puts): ditto.
* object.c (rb_obj_inspect): ditto
* struct.c (rb_struct_inspect): ditto.
* lib/set.rb (SortedSet::setup): a hack to shut up warning.
[ruby-talk:132866]
* lib/time.rb (Time::strptime): add new function. inspired by
[ruby-talk:132815].
* lib/parsedate.rb (ParseDate::strptime): ditto.
* regparse.c: move st_*_strend() functions from st.c. fixed some
potential memory leaks.
* exception error messages updated. [ruby-core:04497]
* ext/socket/socket.c (Init_socket): add bunch of Socket
constants. Patch from Sam Roberts <sroberts@uniserve.com>.
[ruby-core:04409]
* array.c (rb_ary_s_create): no need for negative argc check.
[ruby-core:04463]
* array.c (rb_ary_unshift_m): ditto.
* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
of StandardError class, not Exception class. [ruby-core:04429]
* parse.y (fcall_gen): lvar(arg) will be evaluated as
lvar.call(arg) when lvar is a defined local variable. [new]
* object.c (rb_class_initialize): call inherited method before
calling initializing block.
* eval.c (rb_thread_start_1): initialize newly pushed frame.
* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
fixed: [ruby-core:04444]
* eval.c (is_defined): NODE_IASGN is an assignment.
* ext/readline/readline.c (Readline.readline): use rl_outstream
and rl_instream. [ruby-dev:25699]
* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
[ruby-dev:25675]
* misc/ruby-mode.el: [ruby-core:04415]
* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]
* lib/rdoc/generators/ri_generator.rb: ditto.
* struct.c (make_struct): fixed: [ruby-core:04402]
* ext/curses/curses.c (window_color_set): [ruby-core:04393]
* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
[ruby-talk:130092]
* object.c: [ruby-doc:818]
* parse.y (open_args): fix too verbose warnings for the space
before argument parentheses. [ruby-dev:25492]
* parse.y (parser_yylex): ditto.
* parse.y (parser_yylex): the first expression in the parentheses
should not be a command. [ruby-dev:25492]
* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]
* object.c (Init_Object): remove Object#type. [ruby-core:04335]
* st.c (st_foreach): report success/failure by return value.
[ruby-Bugs-1396]
* parse.y: forgot to initialize parser struct. [ruby-dev:25492]
* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
[ruby-talk:127711]
* document updates - [ruby-core:04296], [ruby-core:04301],
[ruby-core:04302], [ruby-core:04307]
* dir.c (rb_push_glob): should work for NUL delimited patterns.
* dir.c (rb_glob2): should aware of offset in the pattern.
* string.c (rb_str_new4): should propagate taintedness.
* env.h: rename member names in struct FRAME; last_func -> callee,
orig_func -> this_func, last_class -> this_class.
* struct.c (rb_struct_set): use original method name, not callee
name, to retrieve member slot. [ruby-core:04268]
* time.c (time_strftime): protect from format modification from GC
finalizers.
* object.c (Init_Object): remove rb_obj_id_obsolete()
* eval.c (rb_mod_define_method): incomplete subclass check.
[ruby-dev:25464]
* gc.c (rb_data_object_alloc): klass may be NULL.
[ruby-list:40498]
* bignum.c (rb_big_rand): should return positive random number.
[ruby-dev:25401]
* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
random bignums. [ruby-dev:25396]
* variable.c (rb_autoload): [ruby-dev:25373]
* eval.c (svalue_to_avalue): [ruby-dev:25366]
* string.c (rb_str_justify): [ruby-dev:25367]
* io.c (rb_f_select): [ruby-dev:25312]
* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]
* struct.c (make_struct): [ruby-dev:25249]
* dir.c (dir_open_dir): new function. [ruby-dev:25242]
* io.c (rb_f_open): add type check for return value from to_open.
* lib/pstore.rb (PStore#transaction): Use the empty content when a
file is not found. [ruby-dev:24561]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
irb. [ruby-dev:39243]
* sprintf.c (rb_f_sprintf): sign bit extension should not be done
if FPLUS flag is specified. [ruby-list:39224]
* sprintf.c (rb_f_sprintf): do not prepend dots for negative
numbers if FZERO is specified. [ruby-dev:39218]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb/input-method.rb (IRB::ReadlineInputMethod::initialize):
load and save history automatically. [ruby-core:02352]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c (r_object0): TYPE_USRMARSHAL should restore extended
modules before invoking marshal_load. these two fixes are done
by Masatoshi Seki <m_seki@mva.biglobe.ne.jp>.
* parse.y (yylex): argument parentheses preceded by spaces should
be warned; not error. [ruby-talk:84103]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for objects that cannot be dumped, if they traversed from
marshal_dump. they are just ignored.
* gc.c (Init_stack): cast "space" (doble value) into unsigned
int. should run on PowerPC.
* eval.c (rb_eval): should not execute else part if any exception
is caught. [ruby-dev:21482]
* parse.y (f_args): should allow unparenthesized block argument.
* parse.y (f_rest_arg): should allow unparenthesized rest
argument.
* lib/irb/ruby-lex.rb (RubyLex::identify_identifier): support
'class ::Foo' syntax. [ruby-talk:83514]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_ary_values_at. follow DRY principle.
* re.c (match_values_at): values_at should understand ranges.
* struct.c (rb_struct_values_at): ditto.
* struct.c (inspect_struct): inspect format changed; add "struct "
at the top.
* sprintf.c (rb_f_sprintf): "%p" specifier for inspect output.
(RCR#68)
* eval.c (rb_mod_undef_method): allow "undef_method" to accept
multiple arguments. (RCR#146)
* lib/timeout.rb: put timeout in Timeout module. (RCR#121)
[ruby-talk:61028]
* re.c (match_groups): new method added. (RCR#139)
* variable.c (rb_mod_const_of): should exclude constant defined
in Object, unless retrieving constants of Object.
* string.c (rb_str_new4): do not allocate new string if original
is frozen or already have copy-on-write entry. [ruby-talk:74940]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
after input evaluation.
* lib/irb.rb (IRB::Irb::eval_input): untaint input string. now
irb works for levels 1 and 2.
* ext/syck/rubyext.c (syck_loader_transfer): should not use
rb_cProc directly, since type_proc may be Proc, Block, or
Method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
still left; removed.
* sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec
for example "%5.3d".
* process.c (Init_process): add Process.exit and Process.abort
* pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant
UTF-8 sequences.
* process.c (last_status_set): add pid attribute to Process::Status.
* pack.c (uv_to_utf8): limit maximum length of the encoded string
to 6 bytes, even when the platform supports 8 bytes long integers.
* pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes.
* object.c (copy_object): use "copy_object" method, not "become".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
empty path, just ignore.
* dir.c: remove <sys/parm.h> inclusion.
* compar.c (cmp_eq,cmp_gt,cmp_ge,cmp_lt,cmp_le): check using
rb_cmpint().
* error.c (init_syserr): remove sys_nerr dependency.
* numeric.c (num_cmp): added to satisfy Comparable assumption.
* eval.c (rb_add_method): "initialize" should be public if it is a
singleton method.
* regex.c (re_match): avoid dereferencing if size == 0.
(ruby-bugs-ja:PR#360)
* time.c (time_cmp): should return nil if an operand is not a
number nor time. (ruby-bugs-ja:PR#359)
* file.c (rb_stat_cmp): should return nil if an operand is not
File::Stat.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
numeric class.
* re.c (rb_reg_quote): initial part of the string was never copied
to the quoted string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
less than 2.
* eval.c (POP_VARS): propagate DVAR_DONT_RECYCLE, if
SCOPE_DONT_RECYCLE of ruby_scope is set.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
pathname. In addition, it accepts third optional argument to
specify starting point.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e