instead, which has the opposite meaning of FNM_PERIOD.
* dir.c: Dir::glob now accepts optional FNM_* flags via the second
argument, whereas Dir::[] doesn't.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
since octal literals are formed by three digits at most.
* marshal.c (w_object): module inclusion using extend() should
also be detected.
* eval.c (rb_eval_cmd): cbase should not be NULL; it should be
either ruby_wrapper or Object.
* enum.c (enum_each_with_index): should return self.
* process.c (proc_setpgrp): should return value for non-void function.
* process.c (proc_getpgid): should raise exception if getpgid() return -1.
* string.c (rb_str_ljust): should return a duplicated string.
* string.c (rb_str_rjust): ditto.
* string.c (rb_str_center): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
also be detected.
* eval.c (rb_eval_cmd): cbase should not be NULL; it should be
either ruby_wrapper or Object.
* enum.c (enum_each_with_index): should return self.
* process.c (proc_setpgrp): should return value for non-void function.
* process.c (proc_getpgid): should raise exception if getpgid() return -1.
* string.c (rb_str_ljust): should return a duplicated string.
* string.c (rb_str_rjust): ditto.
* string.c (rb_str_center): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
singleton cbase.
* eval.c (is_defined): adopt new cvar behavior.
* eval.c (rb_eval): ditto.
* eval.c (assign): ditto.
* class.c (rb_mod_clone): should not call rb_obj_clone(), since
Module does not provide "allocate".
* class.c (rb_singleton_class): should crate new singleton class
if obj is a class or module and attached object is different,
which means metaclass of singleton class is sought.
* time.c (time_s_alloc): now follows allocation framework.
* eval.c (rb_eval): should initialize outer class variables from
methods in singleton class definitions.
* eval.c (assign): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- Accept options with the colon in the first argument;
getopts("a:bcd:") is equivalent to getopts("bc", "a:", "d:").
- Do not discard the argument that caused an error.
- Do not discard '-', which commonly stands for stdin.
- Allow specifying a long option with a value using '='.
(command --long-option=value)
- Stop reading options when it meets a non-option argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
--with-xx-{include,lib} is ignored when --with-xx-dir is
specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/imap.rb (getquotaroot): new method.
* lib/net/imap.rb (setacl): remove the rights if the rights
parameter is nil.
* lib/net/imap.rb (getacl): return a MailboxACLItem object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c (st_init_table_with_size): num_bins should be prime numbers
(no decrement).
* st.c (rehash): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/gdbm/gdbm.c (fgdbm_select): ditto.
* ext/sdbm/sdbm.c (fsdbm_select): ditto.
* ext/dbm/dbm.c (fdbm_delete): adopt Hash#delete behavior.
* ext/sdbm/sdbm.c (fsdbm_delete): ditto.
* ext/gdbm/gdbm.c: need not to dup key to the block.
* ext/sdbm/sdbm.c : replace RuntimeError with SDBMError.
* eval.c (rb_f_missing): NoMethod error messages for true, false,
nil must respond visibility like for other objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/uri/generic.rb: registry part must not be allowed for any schemes for the Internet. (RFC2396, section 3.2.2 and 3.2.1.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
singleton methods.
* object.c (rb_mod_to_s): better description.
* hash.c (env_select): should path the assoc list.
* process.c (rb_syswait): thread kludge; should be fixed to
support native thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (remove_method): should not remove a empty method to
implement "undef".
* eval.c (rb_eval): should allow singleton class def for
true/false/nil.
* parse.y (str_extend): backslash escape was done wrong.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
directories.
* class.c (rb_include_module): should preserve ancestor order in
the included class/module.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (security): need not to warn twice.
* marshal.c (r_object): complete restoration before calling
r_regist().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
since 1.6
* parse.y (arg): ditto.
* pack.c (pack_pack): add templates 'q' and 'Q'.
* pack.c (pack_unpack): ditto.
* bignum.c (rb_quad_pack): new utility function.
* bignum.c (rb_quad_unpack): ditto.
* parse.y (assignable): should emit CVASGN within the method
body.
* dir.c (dir_s_glob): should not warn even if no match found.
* eval.c (rb_eval): clean up class variable behavior.
* eval.c (assign): ditto.
* eval.c (is_defined): ditto.
* variable.c (rb_mod_class_variables): need not to call rb_cvar_singleton().
* variable.c (rb_cvar_singleton): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to here.
* eval.c (is_defined): check should be added here too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
in a singleton method.
* eval.c (rb_eval): class variables from singleton methods defined
within singleton class statement should work like ones defined
by sington def statements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/http.rb: HTTP.Proxy should use self for proxy-class's super class.
* lib/net/http.rb: initialize HTTP.proxy_port by HTTP.port.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (fptr_finalize): do not raise error on EBADF if write
buffer is empty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_each_line): ditto.
* io.c (argf_getline): ditto.
* process.c: should include <time.h> to get proper CLK_TCK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/imap.rb (setquota): unset quota if the second argument is nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (method_inspect): proper output format to distinguish
methods and singleton methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
only, no methods.
* eval.c (is_defined): should not dump core on defined?(a::b)
where a is not a class nor a module.
* object.c (Init_Object): remove dup and clone from TrueClass,
FalseClass, and NilClass.
* array.c (rb_ary_fill): Array#fill takes block to get the value to
fill.
* string.c (rb_str_to_i): to_i(0) auto-detects base radix.
* array.c (rb_ary_initialize): fill by the block evaluation value
if block is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (rb_thread_cleanup): need not to free thread stacks at
process termination.
* array.c (rb_ary_fetch): use the block to get the default value
if the block is given.
* eval.c (rb_thread_schedule): should check time only if BOTH
WAIT_SELECT and WAIT_TIME.
* eval.c (umethod_bind): should update rklass field.
* hash.c (rb_hash_update): if a block is given, yields [key,
value1, value2] to the block to resolve conflict.
* string.c (rb_str_split_m): no need to consider KANJI
characters, if the length of separator is 1 (byte).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c (rb_mod_initialize): should accept zero argument.
* object.c (rb_mod_cmp): should raise ArgumentError if
inheritance/inclusion relation between two classes/modules is
not defined. [new]
* io.c (rb_io_fsync): new method. [new]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* signal.c (install_sighandler): do not install sighandler unless
the old value is SIG_DFL.
* io.c (io_write): should not raise exception on O_NONBLOCK io.
* dir.c (dir_set_pos): seek should return dir, pos= should not.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
NODE_SCLASS.
* gc.c (obj_free): need not to clear method cache on class/module
finalization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
method.
* io.c (rb_io_s_open): open should call initialize too. IO#for_fd
also calls initialize. [new]
* error.c (rb_sys_fail): replace INT2FIX() by INT2NUM() since
errno value may not fit in Fixnum size on Hurd.
* error.c (set_syserr): ditto.
* dir.c (dir_s_glob): returns nil if block given.
* io.c (rb_io_each_byte): should return self.
* io.c (rb_io_close_m): close check added.
* dir.c (dir_seek): should return pos.
* parse.y (fixpos): orig may be (NODE*)1, which should not be
dereferenced.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
block. [new]
* eval.c (localjump_error): should preserve exit status in the
exception object. [new]
* eval.c (proc_invoke): should raise exception for "break" if it's
yielding, not calling. [new]
* eval.c (block_pass): should NOT raise exception for "break". [new]
* eval.c (block_pass): should allow block argument relay even in
the tainted mode.
* ext/socket/socket.c: support subclassing by proper "initialize"
calling convention. [new]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
exception class.
* lib/resolv.rb: use Resolv::ResolvTimeout for internal timeout to
avoid problem with timeout of application.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (rb_cstr2inum): reject prefix followed by spaces only.
* class.c (rb_class_inherited): should use Object when no super
class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_set_default): Hash#default= should return the
new value.
* string.c (rb_str_to_i): accepts optional base argument. [new]
* numeric.c (rb_fix2str): should not handle negative fixnum values
int32 via calling sprintf() directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
comment at beginning of buffer failed.
* misc/ruby-mode.el (font-lock-defaults): unless XEmacs, set
font-lock variables in ruby-mode-hook.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fractional_seconds to specify a number of digits of
fractional part of the time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (pipe_open): ditto.
* defines.h: sparc linux needs different FLUSH_REGISTER_WINDOWS
* regex.c (re_search): abandon stclass optimization.
* bignum.c (rb_cstr2inum): deny "0_".
* bignum.c (rb_cstr2inum): allow "0\n" and so on.
* error.c (rb_invalid_str): utility function to show inspect()'ed
string.
* bignum.c (rb_cstr2inum): prints invalid strings in inspect()'ed
format.
* object.c (rb_Float): ditto.
* object.c (rb_convert_type): no longer use rb_rescue().
* re.c (rb_reg_search): initialize taint status of match object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (rb_compile_file): no longer need to strdup() here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/protocol.rb: Protocol#start returns the return value of block.
* lib/net/protocol.rb: set timeout limit by default.
* lib/net/protocol.rb: new methods WriteAdapter#write, puts, print, printf.
* lib/net/http.rb: rename HTTP#get2 to request_get, post2 to request_post ...
* lib/net/smtp.rb: should not resolve HELO domain automatically.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb: prefix target directories with $(DESTDIR) all.
* lib/mkmf.rb: no need to mkdir $(libdir)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
default method visibility.
* eval.c (rb_attr): should warn if the default method visibility
is "module_function" (can be error).
* eval.c (rb_mod_define_method): should define class/module method
also if the visibility is "module_function".
* eval.c (rb_mod_define_method): should call hook method
"method_added", and "singleton_method_added".
* string.c: use RESIZE_CAPA for capacity change.
* ext/socket/socket.c (Init_socket): add listen method to
TCPServer and UNIXServer.
* ext/socket/socket.c (bsock_send): should raise EWOULDBLOCK
exception.
* ext/socket/socket.c (s_recvfrom): ditto.
* ext/socket/socket.c (s_accept): ditto.
* ext/socket/socket.c (udp_send): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (rb_thread_schedule): should not select a thread which is
not yet initialized.
* time.c (time_plus): wrong boundary check.
* time.c (time_minus): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(time_utc_offset): new function.
(Init_Time): bind above methods to `time_utc_offset'.
* time.c: 64bit time_t support.
(time_s_at): use NUM2LONG instead of NUM2INT for tv_sec.
(time_arg): initialize tm_isdst correctly.
use long to initialize tm_year.
(search_time_t): renamed from `make_time_t'.
(make_time_t): call `timegm' and `mktime' instead of `search_time_t'
if availabe.
(time_to_i): use LONG2NUM instead of INT2NUM.
(time_localtime): check localtime failure.
(time_gmtime): check gmtime failure.
(time_year): use LONG2NUM instead of INT2FIX.
(time_to_a): use long for tm_year.
(time_dump): check tm_year which is not representable with 17bit.
(time_load): initialize tm_isdst.
* configure.in: check existence of `mktime' and `timegm'.
check existence of tm_gmtoff field of struct tm.
fix negative time_t for 64bit time_t.
* missing/strftime.c: fix overflow by tm_year + 1900.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e