Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* prec.c (prec_prec_f): documentation patch from

  <gerardo.santana at gmail.com>.  [ruby-core:07689]

* bignum.c (rb_big_pow): second operand may be too big even if
  it's a Fixnum.  [ruby-talk:187984]

* README.EXT: update symbol description.  [ruby-talk:188104]

* COPYING: explicitly note GPLv2.  [ruby-talk:187922]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 234c47e9fba274e1d07bdc39846cb9dbe3db569e 1 parent 468a0bd
matz authored
View
2  COPYING
@@ -1,6 +1,6 @@
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
You can redistribute it and/or modify it under either the terms of the GPL
-(see the file GPL), or the conditions below:
+version 2 (see the file GPL), or the conditions below:
1. You may make and give away verbatim copies of the source form of the
software without restriction, provided that you duplicate all of the
View
18 ChangeLog
@@ -1,3 +1,21 @@
+Mon Apr 10 01:03:10 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * prec.c (prec_prec_f): documentation patch from
+ <gerardo.santana at gmail.com>. [ruby-core:07689]
+
+Sat Apr 8 02:34:34 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * bignum.c (rb_big_pow): second operand may be too big even if
+ it's a Fixnum. [ruby-talk:187984]
+
+Sat Apr 8 02:12:38 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * README.EXT: update symbol description. [ruby-talk:188104]
+
+Thu Apr 6 23:28:47 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * COPYING: explicitly note GPLv2. [ruby-talk:187922]
+
Thu Apr 6 11:18:37 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/panedwindow.rb: lack of arguments. [ruby-core:7681]
View
23 README.EXT
@@ -330,17 +330,30 @@ of the innermost method (which is defined by Ruby) can be accessed.
2.2.2 ID or Symbol
-You can invoke methods directly, without parsing the string. First I
-need to explain about symbols (whose data type is ID). ID is the
-integer number to represent Ruby's identifiers such as variable names.
-It can be accessed from Ruby in the form:
+You can invoke methods directly, without parsing the string. First I need
+to explain about ID. ID is the integer number to represent Ruby's
+identifiers such as variable names. The Ruby data type corresponding to ID
+is Symbol. It can be accessed from Ruby in the form:
:Identifier
-You can get the symbol value from a string within C code by using
+You can get the ID value from a string within C code by using
rb_intern(const char *name)
+You can retrieve ID from Ruby object (Symbol or String) given as an
+argument by using
+
+ rb_to_id(VALUE symbol)
+
+You can convert C ID to Ruby Symbol by using
+
+ VALUE ID2SYM(ID id)
+
+and to convert Ruby Symbol object to ID, use
+
+ ID SYM2ID(VALUE symbol)
+
2.2.3 Invoke Ruby method from C
To invoke methods directly, you can use the function below
View
11 README.EXT.ja
@@ -380,7 +380,8 @@ C
����������ˡ�Ruby���󥿥ץ꥿��ǥ᥽�åɤ��ѿ�̾����ꤹ��
���˻Ȥ��Ƥ���ID�ˤĤ���������Ƥ����ޤ��礦��
-ID�Ȥ��ѿ�̾���᥽�å�̾��ɽ�����Ǥ���Ruby����Ǥ�
+ID�Ȥ��ѿ�̾���᥽�å�̾��ɽ�����Ǥ���Ruby�Ǥ�ID���б�����
+���֥������ȤȤ��ƥ���ܥ�(Symbol)�����ꡤ
:���̻�
@@ -393,6 +394,14 @@ ID
rb_to_id(VALUE symbol)
+ID���饷��ܥ����뤿��ˤϰʲ��Υޥ����Ȥ��ޤ���
+
+ VALUE ID2SYM(ID id)
+
+����ܥ뤫��ID����뤿��ˤϰʲ��Υޥ����Ȥ��ޤ���
+
+ ID SYM2ID(VALUE symbol)
+
2.2.3 C����Ruby�Υ᥽�åɤ�ƤӽФ�
C����ʸ������ͳ������Ruby�Υ᥽�åɤ�ƤӽФ�����ˤϰʲ�
View
5 bignum.c
@@ -1606,6 +1606,11 @@ rb_big_pow(x, y)
if (yy > 0) {
VALUE z = x;
+ if (RBIGNUM(x)->len * SIZEOF_BDIGITS * yy > 1024*1024) {
+ rb_warn("in a**b, b may be too big");
+ d = (double)yy;
+ break;
+ }
for (;;) {
yy -= 1;
if (yy == 0) break;
View
4 prec.c
@@ -57,9 +57,9 @@ prec_prec_i(x)
/*
* call-seq:
- * num.prec_f => Integer
+ * num.prec_f => Float
*
- * Returns an +Float+ converted from _num_. It is equivalent
+ * Returns a +Float+ converted from _num_. It is equivalent
* to <code>prec(Float)</code>.
*/
Please sign in to comment.
Something went wrong with that request. Please try again.