y2r 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/CHANGELOG +10 -0
  2. data/README.md +7 -7
  3. data/VERSION +1 -1
  4. data/lib/y2r/ast/ycp.rb +8 -0
  5. metadata +4 -2
@@ -0,0 +1,10 @@
1
+ 1.0.1 (2013-10-18)
2
+ ------------------
3
+
4
+ * Use |deep_copy| in ternary operators when needed.
5
+ * Small updates in README.md.
6
+
7
+ 1.0.0 (2013-07-29)
8
+ -----------------
9
+
10
+ * Initial release.
data/README.md CHANGED
@@ -4,9 +4,9 @@ Y2R
4
4
  Y2R is a transpiler translating
5
5
  [YCP](http://doc.opensuse.org/projects/YaST/SLES10/tdg/Book-YCPLanguage.html) (a
6
6
  legacy language used to write parts of
7
- [YaST](http://en.opensuse.org/Portal:YaST)) into Ruby. It will be used to
8
- translate YCP-based parts of the YaST codebase into Ruby, which will allow us to
9
- get rid of YCP completely.
7
+ [YaST](http://en.opensuse.org/Portal:YaST)) into Ruby. It was used to translate
8
+ YCP-based parts of the YaST codebase into Ruby, which will allow us to get rid
9
+ of YCP completely.
10
10
 
11
11
  The translation itself is described by a
12
12
  [specification](https://github.com/yast/y2r/blob/master/spec/y2r_spec.md).
@@ -30,12 +30,12 @@ The following steps will make YCP Killer run on a vanilla openSUSE 12.3 system.
30
30
  some features that are not present in `ycpc` bundled with openSUSE 12.3.
31
31
 
32
32
  To install updated `ycpc`, install the `yast2-core` package from
33
- `YaST:Head:ruby`:
33
+ `YaST:Head`:
34
34
 
35
35
  $ sudo zypper ar -f \
36
- http://download.opensuse.org/repositories/YaST:/Head:/ruby/openSUSE_12.3/ \
37
- YaST:Head:ruby
38
- $ sudo zypper in -f -r YaST:Head:ruby yast2-core
36
+ http://download.opensuse.org/repositories/YaST:/Head/openSUSE_12.3/ \
37
+ YaST:Head
38
+ $ sudo zypper in -f -r YaST:Head yast2-core
39
39
 
40
40
  3. **Install basic Ruby environment**
41
41
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -2501,6 +2501,14 @@ module Y2R
2501
2501
  end
2502
2502
 
2503
2503
  class YETriple < Node
2504
+ def compile_as_copy_if_needed(context)
2505
+ Ruby::TernaryOperator.new(
2506
+ :condition => cond.compile(context),
2507
+ :then => self.true.compile_as_copy_if_needed(context),
2508
+ :else => self.false.compile_as_copy_if_needed(context)
2509
+ )
2510
+ end
2511
+
2504
2512
  def compile(context)
2505
2513
  Ruby::TernaryOperator.new(
2506
2514
  :condition => cond.compile(context),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: y2r
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-07-29 00:00:00.000000000 Z
13
+ date: 2013-10-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cheetah
@@ -103,6 +103,7 @@ executables:
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - CHANGELOG
106
107
  - LICENSE
107
108
  - README.md
108
109
  - VERSION
@@ -138,3 +139,4 @@ signing_key:
138
139
  specification_version: 3
139
140
  summary: Transpiler translating YCP into Ruby
140
141
  test_files: []
142
+ has_rdoc: