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

15148 Коммитов

Автор SHA1 Сообщение Дата
matz 63219d8a24 * io.c (rb_io_extract_encoding_option): "internal_encoding: nil"
to specify no-transcoding.  and other corner case fixed.
  [ruby-dev:37496]

* hash.c (rb_hash_lookup2): new function to look-up hash with
  default value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19 08:22:45 +00:00
nobu e5bfdb8391 * ruby.c (process_options): get rid of warning on DOSISH.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19 06:51:52 +00:00
nobu 20a745f1cf properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19 06:51:39 +00:00
svn 0754cf1cb2 * 2008-12-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 23:42:04 +00:00
matz 00856f76f7 * error.c (exc_equal): duck typing equal to make it transitive.
[ruby-dev:34880]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 23:42:00 +00:00
akr cad0fbddf8 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 14:33:31 +00:00
yugui 5c1bd53c92 * lib/irb/init.rb (IRB.opt_parse): (M17N) adds -U and -E as command
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
2008-12-18 13:09:26 +00:00
xibbar 52d481d8de * lib/cgi/session.rb: fix bug for ignore session_id option.
report from [ruby-core:18635], [Bug #572]

* lib/cgi/core.rb: use Encoding#find when encoding set.

* test/cgi/test_cgi_session.rb: test for session_id specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 12:20:13 +00:00
matz 88cab63a07 * hash.c (rb_hash_aset): string key copying only happen if key is
an exact instance of String, not a subclass. based on a patch
  from Mike Gold <mike.gold.4433 at gmail.com> in [ruby-talk:322667].
  [incompatible] [ruby-talk:322417]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 08:05:17 +00:00
matz 85bae86cb6 * lib/optparse/version.rb: remove variable shadowing to stop
warning.   [ruby-core:20612]

* lib/irb/completion.rb, lib/net/imap.rb, lib/prime.rb,
  lib/rinda/ring.rb, lib/racc/parser.rb,
  lib/shell/command-processor.rb, lib/yaml/yamlnode.rb: ditto.

* lib/racc/parser.rb: remove space before parentheses.

* lib/shell/command-processor.rb, lib/shell/process-controller.rb:
  use parentheses around arguments.

* lib/irb/ext/change-ws.rb, lib/rexml/validation/relaxng.rb,
  lib/yaml/baseemitter.rb: indentation fix.

* lib/matrix.rb: small cosmetic change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-18 07:54:50 +00:00
jeg2 cd5c309542 * lib/xmlrpc/server.rb: Restricting method inspection to show only
non-inherited public methods.  [ruby-core:20603]

* lib/xmlrpc/server.rb:  Fixing method inspection so it doesn't 
  trigger XMLRPC::FaultException when used.  [ruby-core:20604]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 23:15:56 +00:00
svn 118eecc361 * 2008-12-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 15:48:25 +00:00
akr d74d2d13cb rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 15:48:22 +00:00
akr 0a3a98aea4 * ext/socket/socket.c (unix_recv_io): relax msg_controllen error
check.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 10:47:52 +00:00
akr 8ae0a40d02 * ext/pty/extconf.rb: check util.h for OpenBSD.
* ext/pty/pty.c: include util.h if available.  fix variable name.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 10:38:19 +00:00
keiju 67d18f7ff7 * lib/matrix.rb: shut up warning. [ruby-dev:37481] [Bug #899]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 10:25:29 +00:00
matz 8fb2235f48 * array.c (rb_ary_push_m): add modification check before actual
operation.   [ruby-dev:37440]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:56:42 +00:00
matz a89d928bfb * array.c (rb_ary_pop_m): use enum ary_take_pos_flags.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:52:18 +00:00
yugui 5c0b21b7b9 * configure.in (OBJDUMP, OBJCOPY):
*BSD's ports and MacPorts prefix GNU binutils with 'g'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 06:37:20 +00:00
kazu 3d923f01bf * test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_hash):
shut up warning.  see [ruby-dev:37437]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 02:40:53 +00:00
nobu 6bcd363ebf * string.c (rb_str_hash): gets rid of collisions between different
encoding strings.  [ruby-core:20526]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 02:01:37 +00:00
svn 446bcf9a23 * 2008-12-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 00:58:15 +00:00
yugui a34a6b3388 * test/ruby/test_metaclass.rb: removed codes for my debugging.
sorry. [ruby-dev:37470]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17 00:58:10 +00:00
usa 20e35ba14b * bin/testrb: set $0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 13:56:13 +00:00
matz d85760abff * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of):
typo fixed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 13:52:17 +00:00
usa 879d8aa079 * lib/test/unit.rb (Test::Unit.setup_argv): sorry, fixed wrong commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 13:43:34 +00:00
matz 9d049cc729 * lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of):
should assert by instance_of?, not ===.  [ruby-dev:37458]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 13:16:13 +00:00
matz 842be2d7cb * ext/bigdecimal/bigdecimal.c (VpToString): reverted modification
(that caused a bug) in r20359.  [ruby-dev:37370]

* ext/bigdecimal/bigdecimal.c (BigDecimal_limit): comment update.
  [ruby-dev:37465]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 13:10:35 +00:00
usa d8d41b2380 * lib/test/unit.rb (Test::Unit.setup_argv): ALT_SEPARATOR support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 13:03:49 +00:00
akr e27fbfbc98 * ext/pty/pty.c (getDevice): add nomesg argument.
(get_device_once): add nomesg argument.  chmod slave tty to 0600
  if nomesg.  more error tests.
  (no_mesg): new function.
  (pty_open): make slave tty's mode 0600.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 11:39:17 +00:00
tadf 3ea21e47c1 * lib/date/format.rb (_parse): m17n compliant.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 11:25:13 +00:00
akr 56709edc89 * ext/pty/extconf.rb: check posix_openpt.
* ext/pty/pty.c (get_device_once): use posix_openpt if available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 10:49:12 +00:00
akr ce17decdfb * re.c: use strlcpy for error messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 10:44:36 +00:00
nobu a04d12b188 * parse.y (stmt): returns dispatched result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 07:41:54 +00:00
nobu b315664f2b * parse.y (primary): also in ripper, saves in_def before restoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 07:29:47 +00:00
knu 4bf5646e64 Revert the previous change. [ruby-dev:37455]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 06:35:07 +00:00
knu 963752d971 typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 05:57:40 +00:00
knu 8636e50873 * common.mk (complex.$(OBJEXT), rational.$(OBJEXT)): Properly add
dependencies to version.h and revision.h to fix parallel build
  with make -j#.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 04:57:45 +00:00
nobu fbbfcc52f6 * configure.in (ac_cv_func_daemon): daemon(3) is deprecated on Mac OS
X 10.5 or later.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 03:30:58 +00:00
nobu ef1041167e * configure.in (ac_cv_header_ucontext_h): do not use ucontext.h on Mac
OS X 10.5 or later.  merged from MacPorts.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 03:26:51 +00:00
usa bf451dbba4 * dln.c (dln_load): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 02:41:23 +00:00
usa 6a613ba2e4 * ruby.c (set_arg0): use strlcpy() instead of strncpy().
* load.c (rb_feature_p): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 02:37:45 +00:00
matz 587afe728b * parse.y (block_call): block should not be given to yield.
[ruby-core:20583]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16 00:16:46 +00:00
ryan c6f32ff88b Removed json/runner.rb with permission from florian frank. it was serving no purpose
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 22:13:29 +00:00
svn 1b6432235d * 2008-12-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 15:36:28 +00:00
akr ca4798c4c3 add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 15:36:26 +00:00
matz 13919e068b * thread.c (sleep_timeval): cast tv_usec to long to shut up
warnings on OSX.  [ruby-dev:37449]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 14:49:31 +00:00
matz 0e20782339 * ruby.c (process_options): revive global sub, gsub, chop, chomp
only when auto looping options (-p/-n) is specified.
  [ruby-core:20570]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 14:46:50 +00:00
akr bfaef6a336 * ext/pty/pty.c (pty_open): set FMODE_SYNC and FMODE_DUPLEX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 14:35:00 +00:00
akr 4da3316ca3 * ext/pty/pty.c (pty_open): new method PTY.open.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15 13:48:51 +00:00