[ruby/pp] Expose PP::VERSION
https://github.com/ruby/pp/commit/3d0e65e79f
This commit is contained in:
parent
652f273308
commit
3f8756484f
@ -1,6 +1,13 @@
|
|||||||
|
name = File.basename(__FILE__, ".gemspec")
|
||||||
|
version = ["lib", Array.new(name.count("-")+1).join("/")].find do |dir|
|
||||||
|
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
||||||
|
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
||||||
|
end rescue nil
|
||||||
|
end
|
||||||
|
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = "pp"
|
spec.name = name
|
||||||
spec.version = "0.4.0"
|
spec.version = version
|
||||||
spec.authors = ["Tanaka Akira"]
|
spec.authors = ["Tanaka Akira"]
|
||||||
spec.email = ["akr@fsij.org"]
|
spec.email = ["akr@fsij.org"]
|
||||||
|
|
||||||
|
@ -61,6 +61,9 @@ require 'prettyprint'
|
|||||||
# Tanaka Akira <akr@fsij.org>
|
# Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
class PP < PrettyPrint
|
class PP < PrettyPrint
|
||||||
|
|
||||||
|
VERSION = "0.4.0"
|
||||||
|
|
||||||
# Returns the usable width for +out+.
|
# Returns the usable width for +out+.
|
||||||
# As the width of +out+:
|
# As the width of +out+:
|
||||||
# 1. If +out+ is assigned to a tty device, its width is used.
|
# 1. If +out+ is assigned to a tty device, its width is used.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user