Граф коммитов

1698 Коммитов

Автор SHA1 Сообщение Дата
matz 2b6252e64e * array.c (rb_ary_choice): a new method to choose an element
randomly from an array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-01 08:45:28 +00:00
ko1 75d28f8870 * yarvcore.h, compile.c (set_arguments): support post arguments.
* test/ruby/test_method.rb: add tests for above.
* test/ruby/test_proc.rb: ditto.
* proc.c: fix an arity bug ([ruby-core:11029]).
* vm.c, vm.h, insns.def, vm_dump.h: fix bmethod process.
* vm.c: support block argument on block parameter.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-01 04:35:58 +00:00
ko1 9d89855052 * compile.c: support multiple splat (e.g, [a, *b, *c, e, *f]).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-26 16:54:58 +00:00
nobu da4ad54e47 * misc/ruby-style.el: new file. C/C++ style for ruby source code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-26 04:54:01 +00:00
nobu 4134a542ba * thread.c (alloc_event_fook, rb_thread_remove_event_hook): should
return value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-25 01:32:24 +00:00
nobu 787c3ead18 * dir.c (do_stat, do_lstat, do_opendir): should not warn ENOTDIR.
[ruby-talk:248288]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-24 00:33:09 +00:00
nobu 692010a235 * lib/mkmf.rb (libpathflag): not to append RPATHFLAG to current
directory.

* lib/mkmf.rb (init_mkmf): add current directory to default
  library path with highest priority.  [ruby-core:10960]

* lib/mkmf.rb (LINK_SO): LIBPATH to be placed before DLDFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-23 13:08:29 +00:00
nobu 3fc37d71c4 * eval.c (ruby_cleanup): re-send signal. [ruby-dev:30516]
* eval_error.h (error_handle): no message when exiting by signal.

* intern.h (rb_thread_signal_raise, ruby_default_signal): prototypes.

* signal.c (esignal_init): takes a signal number and an optional
  signal name.

* signal.c (interrupt_init): pass SIGINT always.

* signal.c (ruby_default_signal): invoke system default signal
  handler.

* signal.c (rb_f_kill): use NUM2PIDT instead of NUM2INT.

* signal.c (rb_signal_exec, trap): handle SIGTERM.  [ruby-dev:30505]

* thread.c (rb_thread_signal_raise): now takes signal number instead
  of signal name.

* thread.c (rb_thread_signal_exit): since rb_make_exception() calls
  #exception method, rb_class_new_instance() is not needed here.

* yarvcore.h (struct rb_vm_struct), eval_jump.h (terminate_process):
  exit_code is no longer stored in VM.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-19 17:37:03 +00:00
ko1 2dd91facca * lib/optparse.rb: fix to override conv proc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-19 08:48:03 +00:00
nobu 5f8b25745b * configure.in (LDFLAGS): prepend -L. instead appending it to
XLDFLAGS.  [ruby-core:10933]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-17 17:17:15 +00:00
matz 9cd678b72f * time.c (time_arg): should allow to specify 24:00.
[ruby-core:10915]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-16 07:28:16 +00:00
ko1 baeb828c03 * compile.c (iseq_compile_each): check node->nd_state == 1, not !0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-12 07:06:17 +00:00
usa 314734add8 * win32/win32.[ch] (rb_w32_enter_critical, rb_w32_leave_critical): no
need to reject reentrance. removed.

	* rubysig.h (RUBY_CRITICAL): follow above changes.

	* rubysig.h (TRAP_BEG, TRAP_END): no need to save errno.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-11 07:37:02 +00:00
usa f024801e1e * thread_pthread.ci (native_thread_create): initialize sleep_cond.
fixed: [ruby-dev:30675]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-10 06:53:39 +00:00
usa 1486959550 * thread.c (do_select): use ubf_select() as UBF on windows.
* win32/win32.c (do_select): shouldn't call catch_interrupt() here.
	  fixed: [ruby-dev:30674], reported by wanabe.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-09 09:29:45 +00:00
nobu e12090b9b2 * compile.c (defined_expr): test arguments of NODE_CALL and so
on as well as NODE_ATTRASGN.  [ruby-core:10886]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-08 04:27:41 +00:00
usa 406389a9f3 * 2007-04-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-06 01:29:48 +00:00
nobu f1796fdb2c * error.c (rb_notimplement), io.c (pipe_open): removed definite
articles and UNIX manual section from messages.  [ruby-dev:30690]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-04 15:42:16 +00:00
nobu 1f9d0992ab * io.c (pipe_open): raise NotImplementedError for command "-" on
platforms where fork(2) is not available.  [ruby-dev:30681]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-04 01:17:34 +00:00
usa 7fa11815f8 * 2007-04-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-03 00:14:28 +00:00
nobu 790999028d * insns.def (throw), thread.c, yarvcore.h (throwed_errinfo): fixed
typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-02 12:54:42 +00:00
eban d46b261599 * 2007-03-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-29 17:32:56 +00:00
usa 240f1279aa * win32/win32.c (init_env, insert, cmdglob, rb_w32_cmdvector,
rb_w32_opendir, rb_w32_readdir, rb_w32_strerror, rb_w32_stati64,
	  rb_w32_get_environ): use strlcpy() and strlcat().

	* win32/win32.c (rb_w32_opendir): use realloc() instead of xrealloc().

	* win32/win32.c (rb_w32_closedir): check NULL before free pointers.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-23 02:30:53 +00:00
usa fa36cffb3e * 2007-03-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-22 01:28:41 +00:00
nobu df896a0560 * bignum.c (rb_big2str0): round up for the most significant digit.
[ruby-core:10686]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-21 08:04:11 +00:00
nobu 08b53aa67a * thread.c (thread_create_core): block is not used if first_func
is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19 16:02:05 +00:00
usa a20ecf3be4 * 2007-03-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19 03:22:01 +00:00
usa f3cde2b5fb * win32/dir.h, win32/win32.c (rb_w32_opendir, rb_w32_readdir,
rb_w32_closedir): get rid of possible buffer-overflows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-17 23:42:00 +00:00
kou 966a25465a * lib/rss, test/rss:
- supported Atom.
  - bumped version 0.1.6 to 0.1.7.
* sample/rss/convert.rb: added new sample.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-17 10:13:25 +00:00
eban 53cbab0484 * 2007-03-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-16 13:35:14 +00:00
matz 30aa46db0b * ext/bigdecimal/bigdecimal.c: BigDecimal("-.31") is now
treated as ("-0.31") not as ("0.31").

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-14 05:39:00 +00:00
knu 9d5c0ea4a3 * lib/cgi.rb (CGI::header): IIS >= 5.0 does not need the nph
assumption any more; submitted by MIYASAKA Masaru <alkaid AT
  coral.ocn.ne.jp> in [ruby-dev:30537].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-12 17:48:10 +00:00
knu 62d54a282e 20070312
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-12 04:04:17 +00:00
eban 7f4bbc6530 * 2007-03-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-11 03:13:07 +00:00
nobu da3558fddb * parse.y (parser_yylex), win32/win32.c (rb_w32_utime): fixed
indentation broken at YARV merger.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-04 16:36:36 +00:00
nobu 9b7ecc68a9 * file.c (rb_stat_s_utime): fixed a commit miss for the platforms
where utimes() does not exist.

* lib/fileutils.rb (touch): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-04 14:38:02 +00:00
nobu 15dabe8216 * file.c (rb_file_s_utime): allow nil to set the current time.
* lib/fileutils.rb (touch): ditto, and added :mtime and :nocreate
  options.  fixed: [ruby-talk:219037]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-03 13:37:02 +00:00
knu 5d8187d772 * object.c (instance_variable_get): Restore rdoc markups lost in
the last commit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-03 06:53:38 +00:00
matz 582f1ecdfb * object.c (rb_obj_ivar_set): RDoc updated according to a
suggestion from Brian Candler <B.Candler AT pobox.com>.
  [ruby-core:10469]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-01 22:59:12 +00:00
nobu 50d3ece900 * mkconfig.rb (patchlevel): read from version.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-28 17:05:18 +00:00
shyouhei e38fd64fcd * mkconfig.rb (RbConfig): add CONFIG['PATCHLEVEL']
* common.mk: new target dist

* distruby.rb: new file



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-27 15:12:18 +00:00
eban 3623df9bc6 * 2007-02-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-26 16:29:21 +00:00
ko1 e98f7e1eaa * common.mk: change "gdb" rule. You can debug miniruby with
$(srcdir)/test.rb on gdb by this rule (type "make gdb").
  If you write break points to "breakpoints.gdb" on $srcdir,
  gdb runs with this file.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-25 15:58:27 +00:00
ko1 71986ef6bc * yarvcore.h:
rename:
  rb_iseq_t#file_name -> filename
  rb_iseq_t#local_tbl -> local_table
  add:
  rb_iseq_t#local_table_size
* compile.c: separate local_table_size and local_size
  (local variable size)
* blockinlining.c: apply above rename.
* compile.h: ditto.
* eval.c: ditto.
* iseq.c: ditto.
* proc.c: ditto.
* vm.c: ditto.
* vm_dump.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-25 01:34:33 +00:00
suke 1fcf93350f * ext/win32ole/win32ole.c: add WIN32OLE_VARIANT.array,
WIN32OLE_VARIANT#value=, refactoring.

* test/win32ole/test_win32ole_variant.rb: add some test for
  WIN32OLE_VARIANT.array, WIN32OLE_VARIANT#value=.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23 22:39:25 +00:00
matz 0c882f4c9d * string.c (rb_str_ord): need not to check string length; ord
returns a codepoint for the first character in the string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-23 01:21:49 +00:00
nobu e3b0b6d5fe * eval_load.c (rb_require_safe): should restore safe level.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-21 00:14:07 +00:00
ko1 661955cc39 * thread.c (do_select, rb_thread_wait_fd_rw): raise sys error if
errno is not 0 and EBADF.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-20 06:07:05 +00:00
matz 2551d9b534 * ext/socket/socket.c (unix_peeraddr): wrong syscall name in error
message for #peeraddr. a patch from Sam Roberts
  <sroberts at uniserve.com>.  [ruby-core:10366]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-19 08:17:14 +00:00
eban 728fa4a661 * 2007-02-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-18 10:47:07 +00:00