aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
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 /actionpack
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 'actionpack')
-rw-r--r--actionpack/lib/action_pack/version.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/actionpack/lib/action_pack/version.rb b/actionpack/lib/action_pack/version.rb
index 5c87a9cd7c..b5e47d78d1 100644
--- a/actionpack/lib/action_pack/version.rb
+++ b/actionpack/lib/action_pack/version.rb
@@ -1,10 +1,11 @@
module ActionPack
- module VERSION #:nodoc:
- MAJOR = 4
- MINOR = 0
- TINY = 0
- PRE = "beta1"
+ # Returns the version of the currently loaded ActionPack 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 = ActionPack.version.segments
+ STRING = ActionPack.version.to_s
end
end