aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-03-23 18:51:16 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-03-23 18:51:16 -0700
commite600384515dc06db2c56ff5be5c18779f7b379a5 (patch)
treefc9938962c6872f06d7afbb765eca41302829636 /activesupport/lib
parente96fa8987b0a2c21604c0b5aeb78bedfac5e1faa (diff)
parent8f05fee1ff26247d6fec8f06f711a60a3c4e48fc (diff)
downloadrails-e600384515dc06db2c56ff5be5c18779f7b379a5.tar.gz
rails-e600384515dc06db2c56ff5be5c18779f7b379a5.tar.bz2
rails-e600384515dc06db2c56ff5be5c18779f7b379a5.zip
Merge pull request #8501 from charliesome/version-to-s
Add #to_s method to VERSION modules
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/version.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/version.rb b/activesupport/lib/active_support/version.rb
index ec0967fdd7..ca23057189 100644
--- a/activesupport/lib/active_support/version.rb
+++ b/activesupport/lib/active_support/version.rb
@@ -1,10 +1,11 @@
module ActiveSupport
- module VERSION #:nodoc:
- MAJOR = 4
- MINOR = 0
- TINY = 0
- PRE = "beta1"
+ # Returns the version of the currently loaded ActiveSupport as a Gem::Version
+ def self.version
+ Gem::Version.new "4.0.0.beta1"
+ end
- STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
+ module VERSION #:nodoc:
+ MAJOR, MINOR, TINY, PRE = ActiveSupport.version.segments
+ STRING = ActiveSupport.version.to_s
end
end