File: twitter-text.rb

package info (click to toggle)
ruby-twitter-text 1.14.7%2Bconformance-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 812 kB
  • sloc: ruby: 2,917; java: 1,571; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
major, minor, _patch = RUBY_VERSION.split('.')

$RUBY_1_9 = if major.to_i == 1 && minor.to_i < 9
  # Ruby 1.8 KCODE check. Not needed on 1.9 and later.
  raise("twitter-text requires the $KCODE variable be set to 'UTF8' or 'u'") unless $KCODE[0].chr =~ /u/i
  false
else
  true
end

%w(
  deprecation
  regex
  rewriter
  autolink
  extractor
  unicode
  validation
  hit_highlighter
).each do |name|
  require "twitter-text/#{name}"
end