diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-21 05:02:07 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-21 05:02:07 +0000 |
commit | 137514a3992eba2be425d6f5df48d259428acb20 (patch) | |
tree | e176cf2b83f72262fd9d3f42c2c283c7beb835ea | |
parent | ad70c73ccb29e45f0530633e94cdea37da4fac17 (diff) |
merge revision(s) 50406,50407: [Backport #11075]
* rational.c: Added documentation for rational literal.
[Bug #11075][fix GH-885][ci skip] Patch by @shishir127
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@50579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | rational.c | 5 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Thu May 21 14:01:40 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org> + + * rational.c: Added documentation for rational literal. + [Bug #11075][fix GH-885][ci skip] Patch by @shishir127 + Thu May 21 13:57:47 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/socket/ipsocket.c (init_inetsock_internal): preserve errno diff --git a/rational.c b/rational.c index d8bee601e0..1c0f7deb1c 100644 --- a/rational.c +++ b/rational.c @@ -2451,13 +2451,14 @@ nurat_s_convert(int argc, VALUE *argv, VALUE klass) * a/b (b>0). Where a is numerator and b is denominator. Integer a * equals rational a/1 mathematically. * - * In ruby, you can create rational object with Rational, to_r or - * rationalize method. The return values will be irreducible. + * In ruby, you can create rational object with Rational, to_r, + * rationalize method or suffixing r to a literal. The return values will be irreducible. * * Rational(1) #=> (1/1) * Rational(2, 3) #=> (2/3) * Rational(4, -6) #=> (-2/3) * 3.to_r #=> (3/1) + * 2/3r #=> (2/3) * * You can also create rational object from floating-point numbers or * strings. @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.1.7" #define RUBY_RELEASE_DATE "2015-05-21" -#define RUBY_PATCHLEVEL 352 +#define RUBY_PATCHLEVEL 353 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 5 |