summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-09 20:13:30 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-09 20:13:30 +0000
commit47bb7f37a10a2d6c2d6075f3075a7f8cbe20bcfe (patch)
tree20c78d31cbac988682cc382c0afae2997f7a173c
parent36b3d5577ca9c9e32fa690149d73d557af996422 (diff)
merge revision(s) 34277: [Backport #5881]
* object.c: Added examples for Object#is_a? and Object#instance_of? patcheed from Manoj Kumar. [Bug #5880] [ruby-core:42057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--object.c19
-rw-r--r--version.h2
3 files changed, 22 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 52db45ac58..70532395c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Feb 10 05:13:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * object.c: Added examples for Object#is_a? and
+ Object#instance_of? patcheed from Manoj Kumar.
+ [Bug #5880] [ruby-core:42057]
+
Fri Feb 10 05:11:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
* io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.
diff --git a/object.c b/object.c
index 9ca1e98470..f45e013a13 100644
--- a/object.c
+++ b/object.c
@@ -458,6 +458,15 @@ rb_obj_inspect(VALUE obj)
*
* Returns <code>true</code> if <i>obj</i> is an instance of the given
* class. See also <code>Object#kind_of?</code>.
+ *
+ * class A; end
+ * class B < A; end
+ * class C < B; end
+ *
+ * b = B.new
+ * b.instance_of? A #=> false
+ * b.instance_of? B #=> true
+ * b.instance_of? C #=> false
*/
VALUE
@@ -492,11 +501,13 @@ rb_obj_is_instance_of(VALUE obj, VALUE c)
* end
* class B < A; end
* class C < B; end
+ *
* b = B.new
- * b.instance_of? A #=> false
- * b.instance_of? B #=> true
- * b.instance_of? C #=> false
- * b.instance_of? M #=> false
+ * b.is_a? A #=> true
+ * b.is_a? B #=> true
+ * b.is_a? C #=> false
+ * b.is_a? M #=> true
+ *
* b.kind_of? A #=> true
* b.kind_of? B #=> true
* b.kind_of? C #=> false
diff --git a/version.h b/version.h
index 8ff198d179..be2e6e53fb 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 77
+#define RUBY_PATCHLEVEL 78
#define RUBY_RELEASE_DATE "2012-02-10"
#define RUBY_RELEASE_YEAR 2012