Class: Bundler::CurrentRuby

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/current_ruby.rb

Instance Method Summary collapse

Instance Method Details

#jruby?Boolean

Returns:

  • (Boolean)

82
83
84
# File 'lib/bundler/current_ruby.rb', line 82

def jruby?
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
end

#jruby_18?Boolean

Returns:

  • (Boolean)

86
87
88
# File 'lib/bundler/current_ruby.rb', line 86

def jruby_18?
  jruby? && on_18?
end

#jruby_19?Boolean

Returns:

  • (Boolean)

90
91
92
# File 'lib/bundler/current_ruby.rb', line 90

def jruby_19?
  jruby? && on_19?
end

#maglev?Boolean

Returns:

  • (Boolean)

94
95
96
# File 'lib/bundler/current_ruby.rb', line 94

def maglev?
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "maglev"
end

#mingw?Boolean

Returns:

  • (Boolean)

142
143
144
# File 'lib/bundler/current_ruby.rb', line 142

def mingw?
  Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu != 'x64'
end

#mingw_18?Boolean

Returns:

  • (Boolean)

146
147
148
# File 'lib/bundler/current_ruby.rb', line 146

def mingw_18?
  mingw? && on_18?
end

#mingw_19?Boolean

Returns:

  • (Boolean)

150
151
152
# File 'lib/bundler/current_ruby.rb', line 150

def mingw_19?
  mingw? && on_19?
end

#mingw_20?Boolean

Returns:

  • (Boolean)

154
155
156
# File 'lib/bundler/current_ruby.rb', line 154

def mingw_20?
  mingw? && on_20?
end

#mingw_21?Boolean

Returns:

  • (Boolean)

158
159
160
# File 'lib/bundler/current_ruby.rb', line 158

def mingw_21?
  mingw? && on_21?
end

#mingw_22?Boolean

Returns:

  • (Boolean)

162
163
164
# File 'lib/bundler/current_ruby.rb', line 162

def mingw_22?
  mingw? && on_22?
end

#mri?Boolean

Returns:

  • (Boolean)

54
55
56
# File 'lib/bundler/current_ruby.rb', line 54

def mri?
  !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
end

#mri_18?Boolean

Returns:

  • (Boolean)

58
59
60
# File 'lib/bundler/current_ruby.rb', line 58

def mri_18?
  mri? && on_18?
end

#mri_19?Boolean

Returns:

  • (Boolean)

62
63
64
# File 'lib/bundler/current_ruby.rb', line 62

def mri_19?
  mri? && on_19?
end

#mri_20?Boolean

Returns:

  • (Boolean)

66
67
68
# File 'lib/bundler/current_ruby.rb', line 66

def mri_20?
  mri? && on_20?
end

#mri_21?Boolean

Returns:

  • (Boolean)

70
71
72
# File 'lib/bundler/current_ruby.rb', line 70

def mri_21?
  mri? && on_21?
end

#mri_22?Boolean

Returns:

  • (Boolean)

74
75
76
# File 'lib/bundler/current_ruby.rb', line 74

def mri_22?
  mri? && on_22?
end

#mswin64?Boolean

Returns:

  • (Boolean)

122
123
124
# File 'lib/bundler/current_ruby.rb', line 122

def mswin64?
  Bundler::WINDOWS && Gem::Platform.local.os == "mswin64" && Gem::Platform.local.cpu == 'x64'
end

#mswin64_19?Boolean

Returns:

  • (Boolean)

126
127
128
# File 'lib/bundler/current_ruby.rb', line 126

def mswin64_19?
  mswin64? && on_19?
end

#mswin64_20?Boolean

Returns:

  • (Boolean)

130
131
132
# File 'lib/bundler/current_ruby.rb', line 130

def mswin64_20?
  mswin64? && on_20?
end

#mswin64_21?Boolean

Returns:

  • (Boolean)

134
135
136
# File 'lib/bundler/current_ruby.rb', line 134

def mswin64_21?
  mswin64? && on_21?
end

#mswin64_22?Boolean

Returns:

  • (Boolean)

138
139
140
# File 'lib/bundler/current_ruby.rb', line 138

def mswin64_22?
  mswin64? && on_22?
end

#mswin?Boolean

Returns:

  • (Boolean)

98
99
100
# File 'lib/bundler/current_ruby.rb', line 98

def mswin?
  Bundler::WINDOWS
end

#mswin_18?Boolean

Returns:

  • (Boolean)

102
103
104
# File 'lib/bundler/current_ruby.rb', line 102

def mswin_18?
  mswin? && on_18?
end

#mswin_19?Boolean

Returns:

  • (Boolean)

106
107
108
# File 'lib/bundler/current_ruby.rb', line 106

def mswin_19?
  mswin? && on_19?
end

#mswin_20?Boolean

Returns:

  • (Boolean)

110
111
112
# File 'lib/bundler/current_ruby.rb', line 110

def mswin_20?
  mswin? && on_20?
end

#mswin_21?Boolean

Returns:

  • (Boolean)

114
115
116
# File 'lib/bundler/current_ruby.rb', line 114

def mswin_21?
  mswin? && on_21?
end

#mswin_22?Boolean

Returns:

  • (Boolean)

118
119
120
# File 'lib/bundler/current_ruby.rb', line 118

def mswin_22?
  mswin? && on_22?
end

#on_18?Boolean

Returns:

  • (Boolean)

10
11
12
# File 'lib/bundler/current_ruby.rb', line 10

def on_18?
  RUBY_VERSION =~ /^1\.8/
end

#on_19?Boolean

Returns:

  • (Boolean)

14
15
16
# File 'lib/bundler/current_ruby.rb', line 14

def on_19?
  RUBY_VERSION =~ /^1\.9/
end

#on_20?Boolean

Returns:

  • (Boolean)

18
19
20
# File 'lib/bundler/current_ruby.rb', line 18

def on_20?
  RUBY_VERSION =~ /^2\.0/
end

#on_21?Boolean

Returns:

  • (Boolean)

22
23
24
# File 'lib/bundler/current_ruby.rb', line 22

def on_21?
  RUBY_VERSION =~ /^2\.1/
end

#on_22?Boolean

Returns:

  • (Boolean)

26
27
28
# File 'lib/bundler/current_ruby.rb', line 26

def on_22?
  RUBY_VERSION =~ /^2\.2/
end

#rbx?Boolean

Returns:

  • (Boolean)

78
79
80
# File 'lib/bundler/current_ruby.rb', line 78

def rbx?
  ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
end

#ruby?Boolean

Returns:

  • (Boolean)

30
31
32
# File 'lib/bundler/current_ruby.rb', line 30

def ruby?
  !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev")
end

#ruby_18?Boolean

Returns:

  • (Boolean)

34
35
36
# File 'lib/bundler/current_ruby.rb', line 34

def ruby_18?
  ruby? && on_18?
end

#ruby_19?Boolean

Returns:

  • (Boolean)

38
39
40
# File 'lib/bundler/current_ruby.rb', line 38

def ruby_19?
  ruby? && on_19?
end

#ruby_20?Boolean

Returns:

  • (Boolean)

42
43
44
# File 'lib/bundler/current_ruby.rb', line 42

def ruby_20?
  ruby? && on_20?
end

#ruby_21?Boolean

Returns:

  • (Boolean)

46
47
48
# File 'lib/bundler/current_ruby.rb', line 46

def ruby_21?
  ruby? && on_21?
end

#ruby_22?Boolean

Returns:

  • (Boolean)

50
51
52
# File 'lib/bundler/current_ruby.rb', line 50

def ruby_22?
  ruby? && on_22?
end

#x64_mingw?Boolean

Returns:

  • (Boolean)

166
167
168
# File 'lib/bundler/current_ruby.rb', line 166

def x64_mingw?
  Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" && Gem::Platform.local.cpu == 'x64'
end

#x64_mingw_20?Boolean

Returns:

  • (Boolean)

170
171
172
# File 'lib/bundler/current_ruby.rb', line 170

def x64_mingw_20?
  x64_mingw? && on_20?
end

#x64_mingw_21?Boolean

Returns:

  • (Boolean)

174
175
176
# File 'lib/bundler/current_ruby.rb', line 174

def x64_mingw_21?
  x64_mingw? && on_21?
end

#x64_mingw_22?Boolean

Returns:

  • (Boolean)

178
179
180
# File 'lib/bundler/current_ruby.rb', line 178

def x64_mingw_22?
  x64_mingw? && on_22?
end