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

30 Коммитов

Автор SHA1 Сообщение Дата
tadf 0c8bc11d3d trivial change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 14:18:50 +00:00
tadf c08b5dfb81 * lib/cmath.rb: new.
* lib/complex.rb: depends lib/cmath.rb.

	* lib/rational.rb: added rdiv.

	* complex.c: removed some math functions.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-05 14:25:40 +00:00
matz ef260b085e revert git backfire in r15860; sorry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-30 15:00:12 +00:00
matz 3730710d79 * proc.c (proc_dup): should copy is_lambda attribute as well.
[ruby-talk:296244]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-30 14:50:55 +00:00
tadf d4f5cb67d4 * complex.c (f_lcm): removed.
* rational.c (rb_lcm, rb_gcdlcm): added.

	* lib/complex.rb (gcd, lcm, gcdlcm): removed.

	* lib/rational.rb (gcd, lcm, gcdlcm): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-27 11:48:00 +00:00
tadf 6125552c27 both complex and rational are now builtin classes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-16 00:23:43 +00:00
tadf 2b72892ac0 * lib/rational.rb (floor, ceil, truncate, round): do not use
definitions of Numeric.

	* lib/rational.rb (to_i): should returns truncated self.

	* lib/complex.rb (numerator): requires
	  Integer#{numerator,denominator}.

	* lib/complex.rb (quo): do not use definition of Numeric.

	* lib/complex.rb (>, >=, <, <=, between?, div, divmod, modulo,
	  floor, ceil, truncate, round): undef'ed.

	* lib/mathn.rb (Rational#inspect): removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 11:47:12 +00:00
akr 6cdef2dc7e * $Date$ keyword removed to avoid inclusion of locale dependent
string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
keiju 721eb816c9 * lib/rational.rb: fix high-precision Rationals cannot be
converted to Floats. [ruby-Bugs:10502], [ruby-core:11069],
	  [ruby-dev:30743]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-08 10:36:45 +00:00
matz 3ef1b8086e * lib/rational.rb (Integer::gcd): small typo fix. [ruby-core:07395]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-20 04:26:13 +00:00
matz f816b8b167 * lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler):
qualify the access for Config constant.  [ruby-dev:28338]

* lib/resolv.rb (Resolv::DNS::Resource::IN::A): qualify
  ClassValue.  [ruby-dev:28338]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-20 00:15:36 +00:00
matz c6b9f16231 * string.c (scan_once): wrong condition to use mbclen2().
[ruby-dev:27535]

* time.c (time_sunday): added predicate methods for the days of the
  week.  [ruby-list:41340]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-27 08:18:38 +00:00
matz 4e07664e19 * lib/mathn.rb (Fixnum): remove debug print.
* lib/rational.rb (Rational): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-19 16:02:55 +00:00
matz 7559d2fd7a * io.c (io_close): call rb_io_close() directly if io is a T_FILE
object.  [ruby-dev:27156]

* file.c (file_expand_path): allow pathnames to expand.
  [ruby-dev:27152]

* numeric.c (Init_Numeric): should define Fixnum#div.
  [ruby-dev:27129]

* file.c (rb_thread_flock): wrap flock(2) by TRAP_BEG and
  TRAP_END.  [ruby-dev:27122]

* file.c (rb_file_join): call FilePathValue() to all Pathnames to
  join.  [ruby-dev:27127]

* file.c (rb_get_path): call StringValueCStr() to ensure no nul
  bytes in path strings.

* gc.c (garbage_collect): need value for return.  [ruby-dev:27127]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-19 16:01:06 +00:00
matz 67d54f209d * array.c (rb_ary_update): pedantic check to detect
rb_ary_to_ary() to modify the receiver.  [ruby-dev:24861]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-15 16:45:03 +00:00
matz 919f456de8 * exception message clean-up by Ian Macdonald <ian@caliban.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29 07:54:38 +00:00
matz 8cee72d5c6 * eval.c (rb_clear_cache_by_class): check both klass and origin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-17 08:58:16 +00:00
nobu ae8463b03c * lib/rational.rb (Integer::denominator): fixed typo. (ruby-bugs-ja:PR#466)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-16 17:19:41 +00:00
matz d0507efdc1 * regex.c (re_match_exec): \Z changed to be consistent with new $
(endbuf) behavior.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-14 09:44:14 +00:00
matz 776e2693e7 * string.c (rb_str_ljust): now takes optional argument to specify
pad string. [ruby-talk:70482]

* string.c (rb_str_rjust): ditto.

* string.c (rb_str_center): ditto.

* string.c (rb_str_justify): utility function.

* eval.c (rb_add_method): call singleton_method_added or
  method_added for every method definition (after ruby_running).
  [ruby-talk:70471]

* array.c (rb_ary_reverse_bang): Array#reverse! should not return
  nil even for arrays sized less than 2.

* io.c (argf_eof): should not block after reading all argument
  files. (ruby-bugs-ja PR#449)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-02 06:41:33 +00:00
matz f550e69efc * parse.y (arg_ambiguous): hopefully better message.
* lib/cgi.rb (CGI::QueryExtension::initialize_query): to_ary


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-04-22 08:18:19 +00:00
matz 117b4df7c7 * lib/complex.rb (Complex#==): should not raise error by type
mismatch.

* lib/rational.rb (Rational#==): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-02-06 09:49:12 +00:00
matz 333eb8380f * eval.c (rb_eval): do not warn discarding already undefined
method.

* lib/rational.rb: undef quo before replacing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-23 08:27:06 +00:00
matz a9ec8adff3 * lib/rational.rb: modified to support "quo".
* numeric.c (num_quo): should return most exact quotient value,
  i.e. float by default, rational if available.

* numeric.c (num_div): "div" should return x.divmod(x)[0].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-23 06:22:50 +00:00
keiju b604386fad * lib/rational.rb(Rational#hash): modify algorism for hash-function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-08-15 07:36:35 +00:00
matz 22010642b2 * eval.c (rb_eval): ruby_frame->last_func may be null, if it's
called outside of a method.

* parse.y (arg): use INT2NUM, not INT2FIX for tUMINUS.

* parse.y (arg): unnecessary negative tPOW treatment.

* parse.y (tokadd_escape): wrong backslash escapement.

* parse.y (stmt,arg): too much void value check.

* parse.y (stmt,arg): need to check void value on rules which does
  not use node_assign().

* ext/socket/socket.c (ipaddr): need not to taint hostnames.

* range.c (range_include): should be based on "<=>", whereas
  member? still is based on "each".

* range.c (range_min,range_max): redefine methods based on "<=>".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-11 07:02:23 +00:00
matz 69a3aaf154 regexp literal (e.g. \202) match, etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-09-01 09:48:03 +00:00
matz 65a5162550 1.4.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-13 05:45:20 +00:00
matz 210367ec88 This commit was generated by cvs2svn to compensate for changes in r372,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-01-20 04:59:39 +00:00
matz 3db12e8b23 Initial revision
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1998-01-16 12:13:05 +00:00